Batch files?

Half Evil

Golden Master
Messages
16,076
I dont understand these. First.. what are they for? As far as i kno, they are basicly made to be used as a shortcut, because it links to the program that you try and loop or something. And you type what to do in notepad. But from there, i dont understnad how to turn it into a batch file..

i kno these can be used for hacking. so if you honestly think i wana hack, go head and lock it. but im just wondering...
 
bath files can't really be used for hacking...

batch files are used for performing a batch of job automatically...

for instance, if you wanted to back up a lot of files

Code:
del d:\backup\*.* /y
copy c:\work\*.* d:\work\
dir d:\backup >> d:\backup\index.txt

now instead of having to type three lines at the command prompt the user only has to type one...

batch files hark back from the days of DOS when just about everything was done with a command line, like launching programs etc... so it made sense that if you wanted to do something that'd take a few lines of typing to do... that you save all the work once and then you just have a single word to do it...

you can also do things like update settings an run tests,
at the place I worked previously I wrote batch file (well technically is was a bash script but they are basically the same) that altered the dates and ran programs, alterd data in a sql database and then started all over again in a masive loop,
it allowed for what could have been months of testing if it all had to be done by hand to be completed ni a half hour...

that's the point of batch files.
 
Ok, so for making updats and such. Well, is there a commend line for an update to start as windows starts, or right before windows is shutdown? because that would make a few things faster for me.
 
you can put startup scripts either in the registry, or in the startup folder.
 
Do you know a start up scrip?
And it would look somewhat like this:
C:\\documents and settings\startupscrip\program update\loop?

or something to that extent?
 
no the startup folder is
C:\Documents and Settings\All Users\Start Menu\Programs\Startup (for all users)
or
C:\Documents and Settings\[username]\Start Menu\Programs\Startup (for named users)

you can just put the batch file in here and it'll start each time you logon/startup
 
Back
Top Bottom