Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
A batch script is a text file that contains certain commands that are executed in sequence. It is used to simplify certain repetitive tasks or routines in the Windows, DOS and OS/2 operating systems, and is also used in complex network and system administration.
A batch script has a file extension of .bat, .cmd or .btm.
The commands in a batch file are executed by a special interface or shell. These commands may include "goto," "for," "call," "echo," "setlocal," etc., and may make use of decision and loop constructs. A batch script can be created using any text editor such as Notepad or WordPad, and must be saved only in plain text format.
A batch file can be run easily by clicking on it or by typing its name in a command line interpreter. A batch script can also be run with arguments. The following are some of the commonly used commands in a batch script:
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.