, also known as Command Prompt or Windows Command Processor, is a shell program on later versions of Windows (NT and CE families), OS/2, eComStation, ArcaOS, and ReactOS. In some versions of Windows (CE .NET 4.2, CE 5.0 and Embedded CE 6.0) it is referred to as the Command Processor Shell. Implementation differs between operating systems, but with significant consistency of behavior and available commands.
Older, related operating systems, DOS and Windows 9x, provided as the shell. replaced in the Windows product line with the introduction of NT. Current versions of Windows include PowerShell as an alternative shell that runs side-by-side with .
The initial version of for Windows NT was developed by Therese Stowell. Windows CE 2.11 was the first embedded Windows release to support a console and a Windows CE version of . The ReactOS implementation of is derived from FreeCOM, the FreeDOS command line interpreter.
In Windows, the shell is presented in the desktop via Windows Terminal or on older versions via Windows Console.
In OS/2 and Windows, the shell supports pipes to allow both sides of a pipeline to run concurrently. As a result, it is possible to redirect the standard error stream. In contrast, uses temporary files, and runs the two sides serially, one after the other.
Multiple commands can be included in a single line using the command separators , or <code>||</code>.
With the separator, a subsequent command is executed even if the previous command indicates an error. In the following example, each of the three commands is executed, one after the other, and regardless of their exit code.
With the separator, a command must succeed, i.e. yield the exit code 0, for the subsequent command to execute. In the following example, only executes if completes successfully, and only executes if also completes successfully.
With the <code>||</code> separator, a command must fail, i.e. yield an exit code not equal 0, for the subsequent command to execute. In the following example, executes if fails, and executes if succeeds.
The shell limits the length of a command line which includes entered text, individual environment variables that are inherited by other processes, and all environment variable expansions On Windows XP and later, the maximum length is 8191 (2<sup>13</sup>-1) characters. On earlier versions, such as Windows 2000 or Windows NT 4.0, the maximum length is 2047 (2<sup>11</sup>-1) characters.
The shell reserves the following characters as special: <code>&<>[]{}^=;!'+,`~</code> and whitespace. In some cases, an argument that contains such characters must be enclosed in double quotes to escape from the special character handling. For example:
The following sections list internal commands for implementations of the shell on various operating systems.
Internal commands in OS/2:
Internal commands in Windows NT and later:
Internal commands in Windows CE .NET 4.2, Windows CE 5.0 and Windows Embedded CE 6.0:
The command is available as an external command.
Internal commands in ReactOS:
On Windows, provides various user experience enhancments as compared to , including: