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 ...
and cmd.exe
.
History
The command was included as a TSR program with MS-DOS and PC DOS versions 5 and later, then Windows 9x, and finally Windows 2000 and later. In early 1989, functionality similar toDOSKEY
was introduced with HISTORY
DOSKEY
was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. DOSKEY
also added a macro expansion facility, though special support was required before applications such as command line processors could take advantage of it. Starting with DOSKEY
command as well. In order to also emulate the DOSKEY
history buffer functionality under DR-DOS, the DR-DOS DOSKEY
worked as a front end to the resident history buffer functionality, which remained part of the kernel.
DOSKEY
has also been included in IBM OS/2 Version 2.0.
In current Windows NT-based operating systems, the DOSKEY
functionality is built into CMD.EXE, although the DOSKEY
command is still used to change its operation.
The DOSKEY
command is not available in FreeDOS, which has such features built into the command interpreter.
Usage
Command switches
DOSKEY allows the use of several command switches:DOSKEY switch ... acroname=[text
;
:Installs a new copy of DOSKEY.
;''[size">ext.html" ;"title="acroname=[text">acroname=[text
;
:Installs a new copy of DOSKEY.
;''[size'
:Sets size of command history buffer to ''size''.
;
:Displays all DOSKEY macros.
:;
::Displays all DOSKEY macros for all executables which have DOSKEY macros.
:;''[executable name]''
::Displays all DOSKEY macros for the given executable.
;
:Displays all commands stored in memory.
;
:Specifies that new text typed is inserted in old text.
;
:Specifies that new text overwrites old text.
;exename
:Specifies the executable.
;filename
:Specifies a file of macros to install.
;
:(undocumented - since MS-DOS 7)
;
:(undocumented - since MS-DOS 7)
;
:(undocumented - since MS-DOS 7)
;
:(undocumented - since MS-DOS 7)
;
:(undocumented - since MS-DOS 7)
;'' acroname'
:Specifies a name for a macro created.
;''Keyboard shortcuts
During a DOSKEY session, the following keyboard shortcuts can be used: ; and :Recall commands ; :Clears command line ; :Clears command line from the cursor to the beginning of the line. ; :Clears command line from the cursor to the end of the line. ; :Displays command history ; :Clears command history ; :Searches command history ; :Selects a command by number ; :Clears macro definitionsCommand macros
DOSKEY implements support for command macros, a simple text-substitution facility which is used somewhat like command line aliases in other environments. ; :Command separator. Allows multiple commands in a macro. ;– :Batch parameters. Equivalent to - in batch programs. ; :Symbol replaced by everything following the macro name on command line.Alternatives
The absence of a command history inCOMMAND.COM
was a serious inconvenience ever since the earliest versions of MS-DOS. Numerous third-party programs have been written to address the issue; many were available long before Microsoft supplied DOSKEY. Some of them, including DOSEDIT
, Chris Dunford's CED
, Sverre Huseby's DOSED
, Ashok Nadkarni's CMDEDIT
, Steven Calwas's ANARKEY
, Eric Tauck's TODDY
, and enhanced DOSKEY written by Paul Houle.
Paul Houle's Enhanced DOSKEY is designed to be an enhanced drop-in replacement for the DOSKEY.COM that ships with MS-DOS and Windows 9x/ Windows Me. It also has a smaller disk and memory-resident footprint. The primary added feature is command and file "auto-completion" via the See also
* List of DOS commandsReferences
Further reading
* * * * (NB. NWDOSTIP.TXT is part of MPDOSTIP.ZIP, maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)External links