Purpose: Reloads the DOS command processor (the program that
DOS internal programs) or starts a new command processor.
Using this command with no options loads a new command processor with the
internal programs. Starting a new command processor also creates a new
environment (SET commands are canceled).
The command processor is loaded in two parts: the transient component
memory-resident component. The memory-resident part resides in a portion
memory that can occasionally be overwritten by application programs. If
happens, DOS will discover that the memory-resident portion is missing
will attempt to go to the disk to reload the transient portion from the
COMMAND.COM program. If COMMAND.COM cannot be found, DOS will terminate
operations until the COMMAND program can reload.
device - Specifies a new input/output device at the time the new
command processor is loaded.
/C (string) - Performs the command indicated by the string and then
to the original command processor.
/E:(size) - Specifies the environment size. The size can be from 160
32,768 bytes. The default value is 256 bytes.
/K (command) - Runs the specified command, program, or batch program
displays the DOS command prompt. This option must be the last one on the
COMMAND command line (new with DOS Version 6).
/P - Keeps the secondary command processor in memory from that point
forward. The EXIT command cannot be used to stop the command processor.
only way to reload the original command processor is by restarting the
This option should be used only when COMMAND is used with the SHELL
the CONFIG.SYS file.
/MSG - Stores all error messages in memory. Useful only if you are
DOS from floppy disks. If you use the /MSG option you must also use the
/Y - Tells COMMAND.COM to step through the batch file that has been
with the /C or /K options . This option is useful for debugging batch
(new with DOS Version 6).
If you enter
command /c dir
DOS will load the secondary command processor, execute the DIR command to
the files on the current drive and directory, and then exit back to the
You could use COMMAND.COM in your CONFIG.SYS file in the following