Script file for Microsoft computer operating systems
Batch file
Filename extensions
.bat, .cmd, .btm
Internet media type
application/bat
application/x-bat
application/x-msdos-program
text/plain
Type of format
Scripting
Container for
Scripts
A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain any command the interpreter accepts interactively and use constructs that enable conditional branching and looping within the batch file, such as IF, FOR, and GOTO labels. The term "batch" is from batch processing, meaning "non-interactive execution", though a batch file might not process a batch of multiple data.
Similar to Job Control Language (JCL), DCL and other systems on mainframe and minicomputer systems, batch files were added to ease the work required for certain regular tasks by allowing the user to set up a script to automate them. When a batch file is run, the shell program (usually COMMAND.COM or cmd.exe) reads the file and executes its commands, normally line-by-line.[1] Unix-like operating systems, such as Linux, have a similar, but more flexible, type of file called a shell script.[2]
The filename extension .bat is used in DOS and Windows. Windows NT and OS/2 also added .cmd. Batch files for other environments may have different extensions, e.g., .btm in 4DOS, 4OS2 and 4NT related shells.
The detailed handling of batch files has changed significantly between versions. Some of the detail in this article applies to all batch files, while other details apply only to certain versions.
^Cite error: The named reference Microsoft_758944 was invoked but never defined (see the help page).
^Cite error: The named reference Stocker was invoked but never defined (see the help page).
A batchfile is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter,...
Computerized batch processing is a method of running software programs called jobs in batches automatically. While users are required to submit the jobs...
execution Batch Enhancer, an applet launched by Norton Utilities to graphically enhance the presentation of batchfilesBatchfile, a text file containing...
C:\Users\root> @echo off rem This batchfile deletes all .txt files in a specified directory pushd %1 del *.txt popd echo All text files deleted in the %1 directory...
a filename extension for text files containing commands to be issued to the operating system (similar to a batchfile). With the introduction of Digital...
interactive debugger for batchfiles A mechanism for creating, maintaining and displaying file descriptions Configuration stored in an INI file Support for the...
Because this word must be the name of an internal command, executable file or batchfile, the error message provided an accurate description of the problem...
name to a built-in command or to the name of an executable program file or batchfile on disk. If no match is found, an error message is printed, and the...
INI-file style format. There was also a standard plain text batchfile named AUTOEXEC.BAT that ran a series of commands on boot. Both these files were...
the filename extension .BAT). Each line of a batchfile is interpreted as a program to run. Batchfiles can also make use of internal commands, such as...
Batch renaming is a form of batch processing used to rename multiple computer files and folders in an automated fashion, in order to save time and reduce...
for OS/360 and successors List of Unix commands List of KDE utilities Batchfile Shell script System software Parsons, June Jamrich; Oja, Dan (2013). New...
operating system uses a particular name for these functions including batchfiles (MSDos-Win95 stream, OS/2), command procedures (VMS), and shell scripts...
file and runs a quiet or silent install from a BatchFile command. However, running an Executable file (such as setup.exe) often bypasses quiet, passive...
stand for the first, second,... parameters of a batchfile. %0 stands for the specification of the batchfile itself as typed on the command line. The % sign...
and "/" instead of "-" as the switch character. For transporting of batchfiles across machines, Microsoft encourages the use of "\" and "/" respectively...
locks. Batch Locks Batch OpLocks were created originally to support a particular behavior of DOS batchfile execution operation in which the file is opened...
Similarly, changing or removing a variable's value inside a DOS or Windows batchfile will change the variable for the duration of COMMAND.COMor CMD.EXE's existence...