What is batch file?
A batch file is a text file that contains a sequence of instructions for a computer operating system. Batch files encapsulate multiple commands in a single file and are created for sequences of commands that users will use repeatedly. Frequently used batch files are part of most operating systems. The order of the commands in the batch file is determined by entering the name of the batch file in the Command line initiated.
Batch files are text files containing a series of commands that are executed by the command interpreter. They allow users to set up a batch script to automate many commands. When batch files are run, a shell program reads the file and executes its commands line by line. Batch files automatically run a sequence of executable files.
In a disk operating system, a batch file has a .BAT extension, while in a UNIX-based operating system, batch files are known as shell scripts. In the IBM Mainframe Virtual Machine operating system, batch files have an .EXEC extension.