batch file

(redirected from .cmd)

batch file

(operating system)
(Or script) A text file containing operating system commands which are executed automatically by the command-line interpreter. In Unix, this is called a "shell script" since it is the Unix shell which includes the command-line interpreter. Batch files can be used as a simple way to combine existing commands into new commands.

autoexec.bat is the best known example of an MS-DOS batch file.

batch file

(1) A file containing data that is processed or transmitted from beginning to end.

(2) A file of operating system commands that are carried out one after the other. The operating system interprets the commands and turns them into machine language that is executed by the CPU.

Batch files are widely used to perform a series of routine file management operations such as making backups and launching applications. In the preparation of each monthly version of this encyclopedia, several batch files are used to combine and aggregate files, launch conversion programs and copy the newly created versions into more than two dozen folders for deployment.

.BAT, .CMD or .SH File Extensions
Windows batch files use a .BAT or .CMD file extension, the latter officially called a Windows "command script." In the Mac and Unix/Linux worlds, batch files are "shell scripts" and use a .SH extension. See batch file abc's, cmd abc's, PowerShell, command line and shell script.