to skip this section if you feel like it. However, if you've done batches but yourbatch knowledge is a bit rusty, for instance, acquired in the good old DOS days,you may wish to quickly browse through this in case there's anything new. Letme emphasize that I'm not trying to be complete and cover all the options andidioms, just the most useful you'll likely use most of the time.
Batch Syntax and Somee Practical Notes
Batch files are series of MS-DOS commands typed in a file, one command perline. The file uses the MS-DOS character set, has an extension of .bat and it isrun automatically if you type it's base name without the extension. If an exe orcom file with the same basename exists, you might want to explicitly specify the.bat extension to guarantee that the batch file gets executed. If you need to usehigh-ASCII characters in the file such as umlauts and special graphics symbols,you must save it as MS-DOS text otherwise the characters might be differentfrom what you expected. Many of the better Windows text editors can save asMS-DOS text (even Wordpad can), and there's good old Edit which still writesout MS-DOS files.The philosophy of batch programming is that nearly all of the batch constructsare ordinary commands that can also be used outside batch scripts in MS-DOS. Although some of these commands are virtually never used outside batches,they are still their in DOS. So most of the commands you'll be likely using areordinary DOS commands and work just as you would expect them to.By the way, if you run into problems in a batch file (e.g. it doing unwantedthings, getting stuck in a loop etc...) you can in most cases quit the execution of a batch file by pressing ctrl+c and answering y when asked if you really want toterminate the batch job.To get a list of all MS-DOS commands type in help in the prompt. For help on anindividual command type it's name followed by a slash and a question mark (e.g. copy /?). I recommend getting to know most of the commands that look interesting, so you'll be familiar with the set of tools used in real world batchscripting.In order for help to work in Windows 9X, you need todownload this set of oldDOS commands, extract it and run help in the current directory.One excellent resource covering pretty much everything from ancient DOS