¥ Uberhacker ¥
11th August 2002
Batch files, or files with a .bat extension, are not as scary as they look. They are simply a series of MS-DOS commands neatly typed in notepad and saved with a .bat extension. When you click on the batch file, you execute the series of commands until you run out of commands in the file. Follow the steps below to create a batch file.
Open a Notepad Document. Enter your MS-DOS commands. They will be executed in the order they are entered. Save the file with a .bat extension. Execute your file by double-clicking it.
Why make batch files?
Batch files can be very useful for automating certain tasks. If you routinely need to make the same floppy disk with your thesis on it, you can create a batch file that copies the specified file straight to the floppy with a single click.
To do this, you would simply create a batch file with the contents "copy C:\WINDOWS\desktop\thesis.doc a:" without the quotes, where "copy" is the command, "C:\WINDOWS\desktop\thesis.doc" is the source file, and "a:" is the destination.
Watch your path
An important thing to remember when making batch files is to get the path names correct. You can get the MS-DOS path name of a file by right-clicking it and then choosing the program tab. The full path name should be in the "Cmd line" box.