DOSKEY is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
in
DOS,
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
,
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and
ReactOS
ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
that adds
command history
Command history is a feature in many operating system shells, computer algebra programs, and other software that allows the user to recall, edit and rerun previous commands.
Command line history was added to Unix in Bill Joy's C shell of 1978; ...
,
macro functionality, and improved editing features to the
COMMAND.COM
and
cmd.exe
command-line interpreter shells.
History
The command was included as a
terminate-and-stay-resident program
A terminate-and-stay-resident program (commonly TSR) is a computer program running under DOS that uses a system call to return control to DOS as though it has finished, but remains in computer memory so it can be reactivated later. This techni ...
with
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 op ...
and
PC DOS versions 5 and later,
then
Windows 9x
Windows 9x is a generic term referring to a line of discontinued Microsoft Windows operating systems released from 1995 to 2000 and supported until 2006, which were based on the kernel introduced in Windows 95 and modified in succeeding version ...
, and finally
Windows 2000
Windows 2000 is a major release of the Windows NT operating system developed by Microsoft, targeting the server and business markets. It is the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RT ...
and later.
In early 1989, functionality similar to
DOSKEY
was introduced with
DR-DOS
DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 198 ...
3.40 with its
HISTORY
History is the systematic study of the past, focusing primarily on the Human history, human past. As an academic discipline, it analyses and interprets evidence to construct narratives about what happened and explain why it happened. Some t ...
CONFIG.SYS directive. This enabled a user-configurable console input history buffer and recall as well as pattern search functionality on the console driver level, that is, fully integrated into the operating system and transparent to running applications. In the summer of 1991,
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
Novell DOS 7 in 1993, the macro capabilities were provided by an external
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
Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
-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
FreeDOS (formerly 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 system, legacy software and supporting embedded systems. FreeDOS ca ...
, 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.
;''
ext'
:Specifies commands to record.
Keyboard shortcuts
During a DOSKEY session, the following
keyboard shortcut
In computing, a keyboard shortcut (also hotkey/hot key or key binding) is a software-based assignment of an action to one or more keys on a computer keyboard. Most Operating system, operating systems and Application software, applications come ...
s 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 definitions
Command 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 in
COMMAND.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
JP Software
4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in MS-DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, it has ...
's
4DOS and
NDOS, also provide additional editing capabilities lacking in DOSKEY, such as
filename completion. Some of the better-known DOSKEY alternatives are Jack Gersbach's
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
Windows Me (Millennium Edition) is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It was the successor to Windows 98, and was released to manufacturing on June 19, 2000, and t ...
. It also has a smaller disk and memory-resident footprint. The primary added feature is command and file "auto-completion" via the
Tab key. Version 2.5, released in 2014, also adds full support for
long filenames (LFN).
See also
*
List of DOS commands
References
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
doskey , Microsoft DocsPaul Houle's enhanced DOSKEY
{{Windows commands
External DOS commands
OS/2 commands
ReactOS commands
Utilities for Windows
Windows administration