Cmd.exe
   HOME

TheInfoList



OR:

Command Prompt, also known as cmd.exe or cmd, is the default
command-line interpreter A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
for the
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
,
eComStation eComStation or eCS is an operating system based on OS/2 Warp for the 32-bit x86 architecture. It was originally developed by Serenity Systems and Mensys BV under license from IBM. It includes additional applications, and support for new hard ...
,
ArcaOS ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and li ...
,
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
(
Windows NT family Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Wind ...
and Windows CE family), and
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been not ...
operating systems. On
Windows CE .NET 4.2 Windows Embedded Compact, formerly Windows Embedded CE, Windows Powered and Windows CE, is an operating system subfamily developed by Microsoft as part of its Windows Embedded family of products. Unlike Windows Embedded Standard, which is base ...
,
Windows CE 5.0 Windows CE 5.0 (codenamed "Macallan") is a successor to Windows CE 4.2, the third release in the Windows CE .NET family. It was first released on July 9, 2004. Like its predecessors, Windows CE 5.0 is marketed towards the embedded device marke ...
and Windows Embedded CE 6.0 it is referred to as the Command Processor Shell. Its implementations differ between operating systems, but the behavior and basic set of commands are consistent. is the counterpart of in
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
and
Windows 9x Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced from 1995 to 2000, which were based on the Windows 95 kernel and its underlying foundation of MS-DOS, both of which were updated in sub ...
systems, and analogous to the
Unix shell A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating syste ...
s used on
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems. The initial version of for
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...
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 FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems. FreeDOS can ...
command line interpreter.


Operation

interacts with the user through a
command-line interface A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
. On Windows, this interface is implemented through the
Win32 console Windows Console is the infrastructure for console applications in Microsoft Windows. An instance of a Windows Console has a screen buffer and an input buffer. It allows console apps to run inside a window or in hardware text mode (so as to oc ...
. may take advantage of features available to native programs of its own platform. For example, on OS/2 and Windows, it can use real
pipes Pipe(s), PIPE(S) or piping may refer to: Objects * Pipe (fluid conveyance), a hollow cylinder following certain dimension rules ** Piping, the use of pipes in industry * Smoking pipe ** Tobacco pipe * Half-pipe and quarter pipe, semi-circula ...
in command pipelines, allowing both sides of the pipeline to run concurrently. As a result, it is possible to redirect the
standard error stream In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdi ...
. ( uses temporary files, and runs the two sides serially, one after the other.) Multiple commands can be processed in a single command line using the command separator . When using this separator in the Windows , each command must complete successfully for the following commands to execute. For example: C:\>CommandA && CommandB && CommandC In the above example, will only execute if completes successfully, and the execution of depends on the successful completion of . To process subsequent commands even if the previous command produces an error, the command separator should be used. For example: C:\>CommandA & CommandB & CommandC On
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
or later, the maximum length of the string that can be used at the command prompt is 8191 characters. On earlier versions, such as
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was offici ...
or
Windows NT 4.0 Windows NT 4.0 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the direct successor to Windows NT 3.51, which was released to manufacturing on July 31, 1996, and then to retail ...
, the maximum length of the string is 2047 characters. This limit includes the command line, individual
environment variable An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP envi ...
s that are inherited by other
processes A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
, and all environment variable expansions. Quotation marks are required for the following special characters: & < > ^ = ; ! ' + , ` ~ hite space


Internal commands


OS/2

The following is a list of the Microsoft OS/2
internal Internal may refer to: *Internality as a concept in behavioural economics *Neijia, internal styles of Chinese martial arts *Neigong or "internal skills", a type of exercise in meditation associated with Daoism *''Internal (album)'' by Safia, 2016 ...
commands: *
break Break or Breaks or The Break may refer to: Time off from duties * Recess (break), time in which a group of people is temporarily dismissed from its duties * Break (work), time off during a shift/recess ** Coffee break, a short mid-morning rest ...
* chcp * cd *
chdir The command, also known as (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files. Implementations The command has been ...
* cls * copy * date *
del Del, or nabla, is an operator used in mathematics (particularly in vector calculus) as a vector differential operator, usually represented by the nabla symbol ∇. When applied to a function defined on a one-dimensional domain, it denotes ...
* detach * dir *
dpath In computing, dpath is an internal cmd.exe command on IBM OS/2 and Microsoft Windowshttps://ss64.com/nt/path.html#dpath that allows using a set of files with the TYPE command and with input redirection as if they are in the current directory ...
*
echo In audio signal processing and acoustics, an echo is a reflection of sound that arrives at the listener with a delay after the direct sound. The delay is directly proportional to the distance of the reflecting surface from the source and the lis ...
* erase * exit * for *
goto GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
* if * md *
mkdir The mkdir (make directory) command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, ...
* path * pause * prompt * rd *
rem Rem or REM may refer to: Music * R.E.M., an American rock band * ''R.E.M.'' (EP), by Green * "R.E.M." (song), by Ariana Grande Organizations * La République En Marche!, a French centrist political party * Reichserziehungsministerium, in Nazi ...
* ren *
rename Rename may refer to: * Rename (computing), rename of a file on a computer * RENAME (command), command to rename a file in various operating systems * Rename (relational algebra), unary operation in relational algebra * Company renaming, rename ...
* rmdir *
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
* shift *
start Start can refer to multiple topics: *Takeoff, the phase of flight where an aircraft transitions from moving along the ground to flying through the air *Starting lineup in sports * Standing start, and rolling start, in an auto race Acronyms *S ...
*
time Time is the continued sequence of existence and event (philosophy), events that occurs in an apparently irreversible process, irreversible succession from the past, through the present, into the future. It is a component quantity of various me ...
* type * ver *
verify CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS (typically residing ...
* vol


Windows NT family

The following list of internal commands is supported by on
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...
and later: *
assoc In computing, a file association associates a file with an application capable of opening that file. More commonly, a file association associates a class of files (usually determined by their filename extension, such as .txt) with a corresponding ...
*
break Break or Breaks or The Break may refer to: Time off from duties * Recess (break), time in which a group of people is temporarily dismissed from its duties * Break (work), time off during a shift/recess ** Coffee break, a short mid-morning rest ...
*
call Call or Calls may refer to: Arts, entertainment, and media Games * Call, a type of betting in poker * Call, in the game of contract bridge, a bid, pass, double, or redouble in the bidding stage Music and dance * Call (band), from Lahore, Paki ...
* cd *
chdir The command, also known as (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files. Implementations The command has been ...
* cls *
color Color (American English) or colour (British English) is the visual perceptual property deriving from the spectrum of light interacting with the photoreceptor cells of the eyes. Color categories and physical specifications of color are associ ...
* copy * date *
del Del, or nabla, is an operator used in mathematics (particularly in vector calculus) as a vector differential operator, usually represented by the nabla symbol ∇. When applied to a function defined on a one-dimensional domain, it denotes ...
* dir *
dpath In computing, dpath is an internal cmd.exe command on IBM OS/2 and Microsoft Windowshttps://ss64.com/nt/path.html#dpath that allows using a set of files with the TYPE command and with input redirection as if they are in the current directory ...
*
echo In audio signal processing and acoustics, an echo is a reflection of sound that arrives at the listener with a delay after the direct sound. The delay is directly proportional to the distance of the reflecting surface from the source and the lis ...
* endlocal * erase * exit * for * ftype *
goto GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
* if *
keys Key or The Key may refer to: Common meanings * Key (cryptography), a piece of information that controls the operation of a cryptography algorithm * Key (lock), device used to control access to places or facilities restricted by a lock * Key (m ...
* md *
mkdir The mkdir (make directory) command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, ...
* mklink (introduced in Windows Vista) *
move Move may refer to: People * Daniil Move (born 1985), a Russian auto racing driver Brands and enterprises * Move (company), an online real estate company * Move (electronics store), a defunct Australian electronics retailer * Daihatsu Move Go ...
* path * pause * popd * prompt * pushd * rd *
rem Rem or REM may refer to: Music * R.E.M., an American rock band * ''R.E.M.'' (EP), by Green * "R.E.M." (song), by Ariana Grande Organizations * La République En Marche!, a French centrist political party * Reichserziehungsministerium, in Nazi ...
* ren *
rename Rename may refer to: * Rename (computing), rename of a file on a computer * RENAME (command), command to rename a file in various operating systems * Rename (relational algebra), unary operation in relational algebra * Company renaming, rename ...
* rmdir *
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
* setlocal * shift *
start Start can refer to multiple topics: *Takeoff, the phase of flight where an aircraft transitions from moving along the ground to flying through the air *Starting lineup in sports * Standing start, and rolling start, in an auto race Acronyms *S ...
*
time Time is the continued sequence of existence and event (philosophy), events that occurs in an apparently irreversible process, irreversible succession from the past, through the present, into the future. It is a component quantity of various me ...
*
title A title is one or more words used before or after a person's name, in certain contexts. It may signify either generation, an official position, or a professional or academic qualification. In some languages, titles may be inserted between the f ...
* type * ver *
verify CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS (typically residing ...
* vol


Windows CE

The following list of commands is supported by on Windows CE .NET 4.2, Windows CE 5.0 and Windows Embedded CE 6.0: * attrib * call * cd * chdir * cls * copy * date * del * dir * echo * erase * exit * goto *
help Help is a word meaning to give aid or signal distress. Help may refer to: Arts, entertainment, and media Films * ''Help'' (2010 film), a Bollywood horror film * ''Help'' (2021 theatrical film), a British psychological thriller film * '' ...
* if * md * mkdir * move * path * pause * prompt *
pwd In Unix-like and some other operating systems, the pwd command (''print working directory'') writes the full pathname of the current working directory to the standard output. Implementations Multics had a pwd command (which was a short name ...
* rd * rem * ren * rename * rmdir * set * shift * start * time * title * type In addition, the command is available as an external command stored in .


ReactOS

The ReactOS implementation includes the following internal commands: * ? *
alias Alias may refer to: * Pseudonym * Pen name * Nickname Arts and entertainment Film and television * ''Alias'' (2013 film), a 2013 Canadian documentary film * ''Alias'' (TV series), an American action thriller series 2001–2006 * ''Alias the J ...
* assoc *
beep The Blocks Extensible Exchange Protocol (BEEP) is a framework for creating network application protocols. BEEP includes building blocks like framing, pipelining, multiplexing, reporting and authentication for connection and message-oriented pee ...
* call * cd * chdir *
choice A choice is the range of different things from which a being can choose. The arrival at a choice may incorporate motivators and models. For example, a traveler might choose a route for a journey based on the preference of arriving at a give ...
* cls * color * copy * ctty * date * del * delete * delay * dir * dirs * echo * echos * echoerr * echoserr * endlocal * erase * exit * for * free * goto *
history History (derived ) is the systematic study and the documentation of the human activity. The time period of event before the invention of writing systems is considered prehistory. "History" is an umbrella term comprising past events as well ...
* if * memory * md * mkdir * mklink * move * path * pause * popd * prompt * pushd * rd * rmdir * rem * ren * rename * replace * screen * set * setlocal * shift * start * time * timer * title * type * ver * verify * vol


Comparison with COMMAND.COM

On Windows, is mostly compatible with but provides the following extensions over it: * More detailed error messages than the blanket "
Bad command or file name "Bad command or file name" is a common and ambiguous error message in MS-DOS and some other operating systems. COMMAND.COM, the primary user interface of MS-DOS, produces this error message when the first word of a command could not be interpreted ...
" (in the case of malformed commands) of . In OS/2, errors are reported in the chosen language of the system, their text being taken from the system message files. The command can then be issued with the error message number to obtain further information. * Supports using of arrow keys to scroll through command history. (Under DOS this function was only available under DR DOS (through
HISTORY History (derived ) is the systematic study and the documentation of the human activity. The time period of event before the invention of writing systems is considered prehistory. "History" is an umbrella term comprising past events as well ...
) and later via an external component called .) * Adds rotating command-line completion for file and folder paths, where the user can cycle through results for the prefix using the , and for reverse direction. * Treats the
caret Caret is the name used familiarly for the character , provided on most QWERTY keyboards by typing . The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofreade ...
character () as the
escape character In computing and telecommunication, an escape character is a character (computing), character that invokes an alternative interpretation on the following characters in a character sequence. An escape character is a particular case of metacharac ...
; the character following it is to be taken literally. There are special characters in and (e.g. "", "" and ", ") that are meant to alter the behavior of the command line processor. The caret character forces the command line processor to interpret them literally. * Supports delayed variable expansion with , allowing values of variables to be calculated at runtime instead of during parsing of script before execution (Windows 2000 and later), fixing DOS idioms that made using control structures hard and complex. The extensions can be disabled, providing a stricter compatibility mode. Internal commands have also been improved: * The command was merged into the command, as part of its
switch In electrical engineering, a switch is an electrical component that can disconnect or connect the conducting path in an electrical circuit, interrupting the electric current or diverting it from one conductor to another. The most common type of ...
. * and commands limit the scope of changes to the environment. Changes made to the command line environment after commands are local to the
batch file Batch may refer to: Food and drink * Batch (alcohol), an alcoholic fruit beverage * Batch loaf, a type of bread popular in Ireland * A dialect term for a bread roll used in North Warwickshire, Nuneaton and Coventry, as well as on the Wirra ...
. command restores the previous settings. * The command allows subroutines within batch file. The command in only supports calling external batch files. * File name parser extensions to the command are comparable with
C shell The C shell (csh or the improved version, tcsh) is a Unix shell created by Bill Joy while he was a graduate student at University of California, Berkeley in the late 1970s. It has been widely distributed, beginning with the 2BSD release of th ...
. * The command can perform
expression evaluation A formula calculator is a software calculator that can perform a calculation in two steps: # Enter the calculation by typing it in from the keyboard. # Press a single button or key to see the final result. This is unlike button-operated calculato ...
. * An expansion of the command supports parsing files and arbitrary sets in addition to file names. * The new and commands provide access past navigated paths similar to "forward" and "back" buttons in a web browser or
File Explorer File Explorer, previously known as Windows Explorer, is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface for accessing the f ...
. * The conditional command can perform case-insensitive comparisons and numeric equality and inequality comparisons in addition to case-sensitive string comparisons. (This was available in DR-DOS, but not in PC DOS or
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
.)


See also

*
Comparison of command shells A command shell is a command-line interface to interact with and manipulate a computer's operating system. General characteristics Interactive features Background execution Background execution allows a shell to run a command without u ...
*
List of DOS commands This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list. In DOS, many standard system commands were pro ...
*
COMMAND.COM COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
*
PowerShell PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-sou ...
*
Windows Terminal Windows Terminal is a multi-tabbed terminal emulator that Microsoft has developed for Windows 10 and later as a replacement for Windows Console. It can run any command-line app in a separate tab. It is preconfigured to run Command Prompt, Pow ...


References


Further reading

* *


External links

* * * * * {{Windows commands Command shells OS/2 command shells Windows command shells OS/2 commands OS/2 files Windows commands Windows files Windows components