DOSKEY: Difference between revisions
m →Further reading: Task 16: replaced (1×) / removed (0×) deprecated |dead-url= and |deadurl= with |url-status=; |
Citation bot (talk | contribs) Add: date. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | #UCB_webform 4/18 |
||
(25 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
{{Use dmy dates|date=July 2019|cs1-dates=y}} |
{{Use dmy dates|date=July 2019|cs1-dates=y}} |
||
{{Infobox |
{{Infobox software |
||
| name = DOSKEY |
| name = DOSKEY |
||
| logo = |
| logo = |
||
| screenshot = |
| screenshot = ReactOS-0.4.13 doskey command 667x434.png |
||
| screenshot size = |
| screenshot size = |
||
| caption = |
| caption = The [[ReactOS]] <code>doskey</code> command |
||
| developer = [[Microsoft]], [[IBM]], [[Novell]], ReactOS contributors |
| developer = [[Microsoft]], [[IBM]], [[Novell]], ReactOS contributors |
||
| released = {{Release year|1991|df=yes}} |
| released = {{Release year|1991|df=yes}} |
||
| latest release version = |
| latest release version = |
||
| latest release date = |
| latest release date = |
||
| operating system = [[MS-DOS]], [[IBM PC DOS|PC DOS]], [[OS/2]], [[Novell DOS 7]], [[DR-DOS]], [[Microsoft Windows|Windows]], [[ReactOS]] |
| operating system = [[MS-DOS]], [[IBM PC DOS|PC DOS]], [[OS/2]], [[eComStation]], [[ArcaOS]], [[Novell DOS 7]], [[DR-DOS]], [[Microsoft Windows|Windows]], [[ReactOS]] |
||
| platform = [[Cross-platform]] |
|||
| genre = [[Command (computing)|Command]] |
| genre = [[Command (computing)|Command]] |
||
| license = |
| license = |
||
| website = |
| website = {{URL|https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey}} |
||
}} |
}} |
||
'''DOSKEY''' is a [[command (computing)|command]] for [[DOS]], [[IBM]] [[OS/2]],<ref>http://www.jatomes.com/Help/Os2Cmd.php#DOSKEY</ref> [[Microsoft |
'''DOSKEY''' is a [[command (computing)|command]] for [[DOS]], [[IBM]] [[OS/2]],<ref>{{Cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#DOSKEY |title=JaTomes Help - OS/2 Commands |access-date=28 July 2019 |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#DOSKEY |archive-date=14 April 2019 |url-status=dead }}</ref> [[Microsoft Windows]],<ref>{{cite web |url=https://technet.microsoft.com/en-us/library/bb490894.aspx |title = Doskey {{!}} Microsoft Docs| date=11 September 2009 }}</ref> and [[ReactOS]]<ref>{{Cite web|url=https://github.com/reactos/reactos/blob/master/base/applications/cmdutils/doskey/doskey.c|title = Reactos/Reactos|website = [[GitHub]]|date = 2 November 2021}}</ref> that adds [[command history]], [[Macro (computer science)|macro]] functionality, and improved editing features to the [[command-line interpreter]]s <code>[[COMMAND.COM]]</code> and <code>[[cmd.exe]]</code>. |
||
==History== |
==History== |
||
The command was included as a [[ |
The command was included as a [[terminate-and-stay-resident program]] with [[MS-DOS]] and [[PC DOS]] versions 5 and later,<ref name="RUNNINGMSDOS">{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=[[Microsoft Press]]|isbn=0-7356-1812-7}}</ref> then [[Windows 9x]],<ref>{{Cite book|author1=Tim O'Reilly|author2=Troy Mott|author3=Walter Glenn|year=1999|title=Windows 98 in a Nutshell: A Desktop Quick Reference|publisher=[[O'Reilly Media|O'Reilly]]|isbn=978-1565924864|url-access=registration|url=https://archive.org/details/windows98innutsh00orei}}</ref> and finally [[Windows 2000]]<ref>{{Cite book|first=Æleen|last=Frisch|year=2001|title=Windows 2000 Commands Pocket Reference|publisher=[[O'Reilly Media|O'Reilly]]|isbn=978-0-596-00148-3}}</ref> and later.<!--Not Windows NT?--> |
||
In early 1989, functionality similar to <code>DOSKEY</code> was introduced with [[DR-DOS]] 3.40 with its <code>[[HISTORY (CONFIG.SYS directive)|HISTORY]]</code> [[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, <code>DOSKEY</code> was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. <code>DOSKEY</code> 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 <code>DOSKEY</code> command as well. In order to also emulate the <code>DOSKEY</code> history buffer functionality under DR-DOS, the DR-DOS <code>DOSKEY</code> worked as a front end to the resident history buffer functionality, which remained part of the kernel. |
In early 1989, functionality similar to <code>DOSKEY</code> was introduced with [[DR-DOS]] 3.40 with its <code>[[HISTORY (CONFIG.SYS directive)|HISTORY]]</code> [[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, <code>DOSKEY</code> was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. <code>DOSKEY</code> 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 <code>DOSKEY</code> command as well. In order to also emulate the <code>DOSKEY</code> history buffer functionality under DR-DOS, the DR-DOS <code>DOSKEY</code> worked as a front end to the resident history buffer functionality, which remained part of the kernel. |
||
<code>DOSKEY</code> has also been included in IBM OS/2 Version 2.0.<ref>[http://www.tavi.co.uk/os2pages/pdf/gg243731_OS2_V2_0_Vol_2_DOS_and_Windows_Environment.pdf OS/2 2.0 Redbooks Volume 2 - DOS and Windows Environment (GG24-3731)]</ref> |
<code>DOSKEY</code> has also been included in IBM OS/2 Version 2.0.<ref>[http://www.tavi.co.uk/os2pages/pdf/gg243731_OS2_V2_0_Vol_2_DOS_and_Windows_Environment.pdf OS/2 2.0 Redbooks Volume 2 - DOS and Windows Environment (GG24-3731)]</ref> |
||
Line 26: | Line 27: | ||
In current [[Windows NT]]-based operating systems, the <code>DOSKEY</code> functionality is built into [[CMD.EXE]], although the <code>DOSKEY</code> command is still used to change its operation. |
In current [[Windows NT]]-based operating systems, the <code>DOSKEY</code> functionality is built into [[CMD.EXE]], although the <code>DOSKEY</code> command is still used to change its operation. |
||
The <code>DOSKEY</code> command is not available in [[FreeDOS]], which has such features built into the command interpreter.<ref>http://help.fdos.org/en/hhstndrd/command/doskey.htm</ref> |
The <code>DOSKEY</code> command is not available in [[FreeDOS]], which has such features built into the command interpreter.<ref>{{cite web |url=http://help.fdos.org/en/hhstndrd/command/doskey.htm |url-status=dead |archive-url=https://web.archive.org/web/20111107161606/http://help.fdos.org/en/hhstndrd/command/doskey.htm |archive-date=7 November 2011 |title=FreeDOS command: doskey}}</ref> |
||
==Usage== |
==Usage== |
||
===Command switches=== |
|||
DOSKEY allows the use of several [[switch (command line)|command switches]]: |
DOSKEY allows the use of several [[switch (command line)|command switches]]: |
||
Line 82: | Line 84: | ||
:Specifies commands to record. |
:Specifies commands to record. |
||
===Keyboard shortcuts=== |
|||
During a DOSKEY session, the following [[keyboard shortcut]]s can be used: |
During a DOSKEY session, the following [[keyboard shortcut]]s can be used: |
||
Line 111: | Line 114: | ||
:Clears macro definitions |
:Clears macro definitions |
||
===Command macros=== |
|||
DOSKEY implements support for command macros, a simple text-substitution facility which is used somewhat like command line [[Alias (command)|aliases]] in other environments. |
DOSKEY implements support for command macros, a simple text-substitution facility which is used somewhat like command line [[Alias (command)|aliases]] in other environments. |
||
;{{mono| |
;{{mono|$T}} |
||
:Command separator. Allows multiple commands in a macro. |
:Command separator. Allows multiple commands in a macro. |
||
;{{mono| |
;{{mono|$1}}–{{mono|$9}} |
||
:Batch parameters. Equivalent to %1-%9 in batch programs. |
:Batch parameters. Equivalent to {{mono|%1}}-{{mono|%9}} in batch programs. |
||
;{{mono| |
;{{mono|$*}} |
||
:Symbol replaced by everything following the macro name on command line. |
:Symbol replaced by everything following the macro name on command line. |
||
Line 125: | Line 129: | ||
The absence of a command history in <code>COMMAND.COM</code> 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]] and [[NDOS]], also provide additional editing capabilities lacking in DOSKEY, such as [[tab completion|filename completion]]. Some of the better-known DOSKEY alternatives are Jack Gersbach's <code>DOSEDIT</code>, Chris Dunford's <code>CED</code>, Sverre Huseby's <code>DOSED</code>, Ashok Nadkarni's <code>CMDEDIT</code>, Steven Calwas's <code>ANARKEY</code>, Eric Tauck's <code>TODDY</code>, and enhanced DOSKEY written by Paul Houle. |
The absence of a command history in <code>COMMAND.COM</code> 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]] and [[NDOS]], also provide additional editing capabilities lacking in DOSKEY, such as [[tab completion|filename completion]]. Some of the better-known DOSKEY alternatives are Jack Gersbach's <code>DOSEDIT</code>, Chris Dunford's <code>CED</code>, Sverre Huseby's <code>DOSED</code>, Ashok Nadkarni's <code>CMDEDIT</code>, Steven Calwas's <code>ANARKEY</code>, Eric Tauck's <code>TODDY</code>, 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 [[Tab key]]. Version 2.5, released in 2014, also adds full support for [[long filename]]s (LFN). |
Paul Houle's Enhanced DOSKEY<ref>{{cite web |url=http://paulhoule.com/doskey/ |title = Enhanced DOSKEY.com -- with auto-completion Paul Houle}}</ref> 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 [[Tab key]]. Version 2.5, released in 2014, also adds full support for [[long filename]]s (LFN). |
||
==See also== |
==See also== |
||
Line 137: | Line 141: | ||
*{{Cite book|first=Peter|last=Dyson|year=1995|title=Mastering OS/2 Warp|publisher=[[Sybex]]|isbn=978-0782116632}} |
*{{Cite book|first=Peter|last=Dyson|year=1995|title=Mastering OS/2 Warp|publisher=[[Sybex]]|isbn=978-0782116632}} |
||
*{{Cite book|first=William R.|last=Stanek|year=2008|title=Windows Command-Line Administrator's Pocket Consultant, 2nd Edition|publisher=[[Microsoft Press]]|isbn=978-0735622623}} |
*{{Cite book|first=William R.|last=Stanek|year=2008|title=Windows Command-Line Administrator's Pocket Consultant, 2nd Edition|publisher=[[Microsoft Press]]|isbn=978-0735622623}} |
||
*{{Cite book |title=NWDOS-TIPs — Tips & |
*{{Cite book |title=NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |series=MPDOSTIP |author-first=Matthias R. |author-last=Paul |date=1997-07-30 |edition=3 |language=de |url=http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |access-date=2014-08-06 |url-status=live |archive-url=https://web.archive.org/web/20161104235829/http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |archive-date=2016-11-04}} (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== |
==External links== |
||
Line 148: | Line 152: | ||
[[Category:External DOS commands]] |
[[Category:External DOS commands]] |
||
[[Category:OS/2 commands]] |
[[Category:OS/2 commands]] |
||
[[Category:ReactOS commands]] |
|||
[[Category:Utilities for Windows]] |
[[Category:Utilities for Windows]] |
||
[[Category:Windows administration]] |
[[Category:Windows administration]] |
Latest revision as of 16:18, 15 October 2023
Developer(s) | Microsoft, IBM, Novell, ReactOS contributors |
---|---|
Initial release | 1991, 32–33 years ago |
Operating system | MS-DOS, PC DOS, OS/2, eComStation, ArcaOS, Novell DOS 7, DR-DOS, Windows, ReactOS |
Platform | Cross-platform |
Type | Command |
Website | docs |
DOSKEY is a command for DOS, IBM OS/2,[1] Microsoft Windows,[2] and ReactOS[3] that adds command history, macro functionality, and improved editing features to the command-line interpreters COMMAND.COM
and cmd.exe
.
History
[edit]The command was included as a terminate-and-stay-resident program with MS-DOS and PC DOS versions 5 and later,[4] then Windows 9x,[5] and finally Windows 2000[6] and later.
In early 1989, functionality similar to DOSKEY
was introduced with DR-DOS 3.40 with its HISTORY
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.[7]
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.[8]
Usage
[edit]Command switches
[edit]DOSKEY allows the use of several command switches:
DOSKEY [/switch ...] [macroname=[text]]
- /REINSTALL
- Installs a new copy of DOSKEY.
- /LISTSIZE=[size]
- Sets size of command history buffer to size.
- /MACROS
- Displays all DOSKEY macros.
- /MACROS:ALL
- Displays all DOSKEY macros for all executables which have DOSKEY macros.
- /MACROS:[executable name]
- Displays all DOSKEY macros for the given executable.
- /HISTORY
- Displays all commands stored in memory.
- /INSERT
- Specifies that new text typed is inserted in old text.
- /OVERSTRIKE
- Specifies that new text overwrites old text.
- /EXENAME=exename
- Specifies the executable.
- /MACROFILE=filename
- Specifies a file of macros to install.
- /APPEDIT
- (undocumented - since MS-DOS 7)
- /COMMAND
- (undocumented - since MS-DOS 7)
- /PERMANENT
- (undocumented - since MS-DOS 7)
- /SCRSIZE
- (undocumented - since MS-DOS 7)
- /XHISTORY
- (undocumented - since MS-DOS 7)
- [macroname]
- Specifies a name for a macro created.
- [text]
- Specifies commands to record.
Keyboard shortcuts
[edit]During a DOSKEY session, the following keyboard shortcuts can be used:
- ↑ and ↓
- Recall commands
- Esc
- Clears command line
- F7
- Displays command history
- Alt+F7
- Clears command history
- F8
- Searches command history
- F9
- Selects a command by number
- Alt+F10
- Clears macro definitions
Command macros
[edit]DOSKEY implements support for command macros, a simple text-substitution facility which is used somewhat like command line aliases in other environments.
- $T
- Command separator. Allows multiple commands in a macro.
- $1–$9
- Batch parameters. Equivalent to %1-%9 in batch programs.
- $*
- Symbol replaced by everything following the macro name on command line.
Alternatives
[edit]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 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[9] 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 Tab key. Version 2.5, released in 2014, also adds full support for long filenames (LFN).
See also
[edit]References
[edit]- ^ "JaTomes Help - OS/2 Commands". Archived from the original on 2019-04-14. Retrieved 2019-07-28.
- ^ "Doskey | Microsoft Docs". 2009-09-11.
- ^ "Reactos/Reactos". GitHub. 2021-11-02.
- ^ Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
- ^ Tim O'Reilly; Troy Mott; Walter Glenn (1999). Windows 98 in a Nutshell: A Desktop Quick Reference. O'Reilly. ISBN 978-1565924864.
- ^ Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. O'Reilly. ISBN 978-0-596-00148-3.
- ^ OS/2 2.0 Redbooks Volume 2 - DOS and Windows Environment (GG24-3731)
- ^ "FreeDOS command: doskey". Archived from the original on 2011-11-07.
- ^ "Enhanced DOSKEY.com -- with auto-completion Paul Houle".
Further reading
[edit]- Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738.
- Dyson, Peter (1995). Mastering OS/2 Warp. Sybex. ISBN 978-0782116632.
- Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623.
- Paul, Matthias R. (1997-07-30). NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP (in German) (3 ed.). Archived from the original on 2016-11-04. Retrieved 2014-08-06. (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.)