Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

DOSKEY

From Wikipedia, the free encyclopedia

DOSKEY
TheReactOSdoskey command
DevelopersMicrosoft,IBM,Novell, ReactOS contributors
Initial release1991, 34–35 years ago
Operating systemMS-DOS,PC DOS,OS/2,eComStation,ArcaOS,Novell DOS 7,DR-DOS,Windows,ReactOS
PlatformCross-platform
TypeCommand
Websitedocs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey

DOSKEY is acommand inDOS,OS/2,[1]Windows,[2] andReactOS[3] that addscommand history,macro functionality, and improved editing features to theCOMMAND.COM andcmd.execommand-line interpretershells.

History

[edit]

The command was included as aterminate-and-stay-resident program withMS-DOS andPC DOS versions 5 and later,[4] thenWindows 9x,[5] and finallyWindows 2000[6] and later.

In early 1989, functionality similar toDOSKEY was introduced withDR-DOS 3.40 with itsHISTORYCONFIG.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 withNovell DOS 7 in 1993, the macro capabilities were provided by an externalDOSKEY command as well. In order to also emulate theDOSKEY history buffer functionality under DR-DOS, the DR-DOSDOSKEY 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 currentWindows NT-based operating systems, theDOSKEY functionality is built intoCMD.EXE, although theDOSKEY command is still used to change its operation.

TheDOSKEY command is not available inFreeDOS, which has such features built into the command interpreter.[8]

Usage

[edit]

Command switches

[edit]

DOSKEY allows the use of severalcommand switches:

DOSKEY [/switch ...] [macroname=[text]]

/REINSTALL
Installs a new copy of DOSKEY.
/LISTSIZE=[size]
Sets size of command history buffer tosize.
/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 followingkeyboard shortcuts can be used:

and
Recall commands
Esc
Clears command line
Ctrl+Home
Clears command line from the cursor to the beginning of the line.
Ctrl+End
Clears command line from the cursor to the end of the 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 linealiases 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 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, includingJP Software's4DOS andNDOS, also provide additional editing capabilities lacking in DOSKEY, such asfilename completion. Some of the better-known DOSKEY alternatives are Jack Gersbach'sDOSEDIT, Chris Dunford'sCED, Sverre Huseby'sDOSED, Ashok Nadkarni'sCMDEDIT, Steven Calwas'sANARKEY, Eric Tauck'sTODDY, 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 theTab key. Version 2.5, released in 2014, also adds full support forlong filenames (LFN).

See also

[edit]

References

[edit]
  1. ^"JaTomes Help - OS/2 Commands". Archived fromthe original on 2019-04-14. Retrieved2019-07-28.
  2. ^"Doskey | Microsoft Docs". 2009-09-11.
  3. ^"Reactos/Reactos".GitHub. 2021-11-02.
  4. ^Wolverton, Van (2003).Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition.Microsoft Press.ISBN 0-7356-1812-7.
  5. ^Tim O'Reilly; Troy Mott; Walter Glenn (1999).Windows 98 in a Nutshell: A Desktop Quick Reference.O'Reilly.ISBN 978-1565924864.
  6. ^Frisch, Æleen (2001).Windows 2000 Commands Pocket Reference.O'Reilly.ISBN 978-0-596-00148-3.
  7. ^OS/2 2.0 Redbooks Volume 2 - DOS and Windows Environment (GG24-3731)
  8. ^"FreeDOS command: doskey". Archived fromthe original on 2011-11-07.
  9. ^"Enhanced DOSKEY.com -- with auto-completion Paul Houle".

Further reading

[edit]

External links

[edit]
Wikibooks has a book on the topic of:Guide to Windows Commands
Ecosystem
Interpreters
Terminals
File system navigation
File management
Archiving
Disk management
Processes
Registry
User environment
File contents
Scripting
Networking
Maintenance and care
Boot management
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=DOSKEY&oldid=1312902924"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp