A batch file is a text file that contains a series of scripted commands that you would normally type manually at the command prompt. The file is generally read line-by-line, but you can create more complicated scripts that check for a series of conditions and jump to another point in the file and resume processing from there. Many of the commands, like copy or move are built into the command prompt, but you can also use command-line applications as well.
Back in the old DOS days, all batch files ended with the .BAT extension, but Windows NT added the optional .CMD extension for batch files. Perhaps the most well-known batch file was the AUTOEXEC.BAT file, which would automatically execute commands every time your DOS or Windows 3.x computer would boot up–in fact, you could add the WIN command to the end of the AUTOEXEC.BAT file to make the PC start Windows automatically.
- By Lowell Heddings on 08/26/12