COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me. It has an additional role as the first program run after boot, hence being responsible for setting up the system by running the AUTOEXEC.BAT configuration file, and being the ancestor of all processes. COMMAND.COM's successor on OS/2 and Windows NT-based operating systems is cmd.exe. COMMAND.COM is also available on 32-bit versions of those systems to provide compatibility when running DOS applications within the NT Virtual DOS machine.
As a shell, COMMAND.COM has two distinct modes of work. First is the interactive mode, in which the user types commands which are then executed immediately. The second is the batch mode, which executes a predefined sequence of commands stored as a text file with the extension .BAT.
Notable internal commands
All commands are run only after the Enter key is pressed at the end of the line. COMMAND.COM is not case-sensitive, meaning commands can be typed in either case and are all equivalent (so dir, DIR and DiR will all work in the same way).
File system commands
In accordance with COMMAND.COM's main function as an operating system shell, it includes a number of built-in commands for working with files.
In order to run a program, simply type the name of its executable and then press "Enter" (it is not necessary to use the extension, e.g. nc.exe can be summoned simply as nc). In order to change the current working drive (see Drive letter assignment), type its letter followed by a colon (e.g. D:). Other file system commands include:
Some versions of MS-DOS COMMAND.COM recognize some internal commands which were not documented.
Full article ▸