Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

A batch file is a file that contains aBatch files are text-based scripts, usually saved with the for execution.bat, currently for the Windows platform.cmd, or .btm filename extension. It includesThey are executed by the command processor (typically COMMAND.batCOM on MS-DOS and earlier versions of Windows, .cmd.exe on IBM OS/2 and later version of Windows). Note that, while batch files are still supported under Windows, recent versions have the much more expressive Powershell.

##Example

This is the source code to a typical "Hello world" program in batch programming:

@ECHO off
ECHO Hello World!
PAUSE

Note the ! may not display if delayed expansion is enabled.

##Tag usage

The tag can be used for programming-related problems in writing a batch script file extensionsfor a Windows-based operating system. Please avoid "suggest a book"-type questions. Note the tag is not to be used for questions referring to a "batch of files" but for questions related to the shell language only.

##Useful links

A batch file is a file that contains a for execution, currently for the Windows platform. It includes the .bat .cmd file extensions.

Batch files are text-based scripts, usually saved with the .bat, .cmd, or .btm filename extension. They are executed by the command processor (typically COMMAND.COM on MS-DOS and earlier versions of Windows, cmd.exe on IBM OS/2 and later version of Windows). Note that, while batch files are still supported under Windows, recent versions have the much more expressive Powershell.

##Example

This is the source code to a typical "Hello world" program in batch programming:

@ECHO off
ECHO Hello World!
PAUSE

Note the ! may not display if delayed expansion is enabled.

##Tag usage

The tag can be used for programming-related problems in writing a batch script file for a Windows-based operating system. Please avoid "suggest a book"-type questions. Note the tag is not to be used for questions referring to a "batch of files" but for questions related to the shell language only.

##Useful links

A batch file is a file that contains a for execution, currently for the Windows platform. It includes the .bat .cmd file extensions.

A batch file is a file that contains a for execution, currently for the Windows platform. It includes the .bat .cmd file extensions.

Link