A file that contains a sequence, or batch, of commands. Batch files are useful for storing sets of commands that are always executed together because you can simply enter the name of the batch file instead of entering each command individually.
In DOS systems, batch files end with a.BAT extension. For example, the following DOS batch file prints the date and time and sets the prompt to GO>:
Whenever you boot a DOS -based computer, the system automatically executes the batch file named AUTOEXEC.BAT, if it exists.
Many operating systems use the terms command file or shell script in place of batch file.