DOSKEY is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
...
for
DOS,
IBM 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 ...
,
Microsoft Windows, 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 noted ...
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
William Nelson ...
,
macro
Macro (or MACRO) may refer to:
Science and technology
* Macroscopic, subjects visible to the eye
* Macro photography, a type of close-up photography
* Image macro, a picture with text superimposed
* Monopole, Astrophysics and Cosmic Ray Observat ...
functionality, and improved editing features to the
command-line interpreter
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
s
COMMAND.COM
and
cmd.exe
.
History
The command was included as a
TSR program 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 oper ...
and
PC DOS versions 5 and later,
then
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 ...
, and finally
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 official ...
and later.
In early 1989, functionality similar to
DOSKEY
was introduced with
DR-DOS
DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-DO ...
3.40 with its
HISTORY
History (derived ) is the systematic study and the documentation of the human activity. The time period of event before the History of writing#Inventions of writing, invention of writing systems is considered prehistory. "History" is an umbr ...
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 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 Wi ...
-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 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 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
computing, a keyboard shortcut also known as hotkey is a series of one or several keys to quickly invoke a software program or perform a preprogrammed action. This action may be part of the standard functionality of the operating system or ...
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's
4DOS
4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in Microsoft DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default ...
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 Millennium Edition, or Windows Me (marketed with the pronunciation of the pronoun "me"), is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It is the successor to Win ...
. It also has a smaller disk and memory-resident footprint. The primary added feature is command and file "auto-completion" via the
Tab key
The tab key (abbreviation of tabulator key or tabular key) on a keyboard is used to advance the cursor to the next tab stop.
History
The word ''tab'' derives from the word ''tabulate'', which means "to arrange data in a tabular, or table, f ...
. Version 2.5, released in 2014, also adds full support for
long filenames (LFN).
See also
*
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 p ...
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