DOSKey
Encyclopedia
DOSKey is a utility for MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 that adds command history
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....

, macro functionality, and improved editing features to the command line interpreters COMMAND.COM
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

and cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...

. It was included as a TSR
Terminate and Stay Resident
Terminate and Stay Resident is a computer system call in DOS computer operating systems that returns control to the system as if the program has quit, but keeps the program in memory...

 program with MS-DOS and PC-DOS
PC-DOS
IBM PC DOS is a DOS system for the IBM Personal Computer and compatibles, manufactured and sold by IBM from the 1980s to the 2000s....

 versions 5 and later, and with Microsoft's Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

/98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

/Me
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

.

In current Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

-based operating systems DOSKey's functionality is built into cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...

, although the DOSKey command is still used to change its operation.

Usage

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 you type 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.
    [macroname] Specifies a name for a macro you create.
    [text] Specifies commands you want to record.


    During a DOSKey session, the following keyboard shortcut
    Keyboard shortcut
    In computing, a keyboard shortcut is a finite set of one or more keys that invoke a software or operating system operation when triggered by the user. A meaning of term "keyboard shortcut" can vary depending on software manufacturer...

    s can be used:
    Up and Down Recall commands
    Esc
    Esc key
    On computer keyboards, the Esc key is a key labeled Esc or Escape that is used to generate the ASCII Escape character , the character code traditionally used to initiate an escape sequence...

    Clears command line
    Ctrl-Home
    Home key
    The home key is a key commonly found on computer keyboards. The key has the opposite effect of the end key. In limited-size keyboards where the home key is missing the same functionality can be reached via the key combination of -Microsoft Windows:...

    Clears command line from the cursor to the beginning of the line.
    Ctrl-End
    End key
    The end key is a key commonly found on computer keyboards. The key has the opposite effect of the home key. In limited-size keyboards where the end key is missing the same functionality can be reached via the key combination of -Microsoft Windows:...

    Clears command line from the cursor to the end of the line.
    F7 Displays command history
    Alt
    Alt key
    The Alt key on a computer keyboard is used to change the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing "A" will type the letter a, but if you hold down either Alt key while pressing A, the computer...

    -F7
    Clears command history
    F8 Searches command history
    F9 Selects a command by number
    Alt-F10 Clears macro definitions


    DOSKey implements support for command macros, a simple text-substitution facility which is used somewhat like command line aliases
    Alias (Unix shell)
    In computing, alias is a command in various command line interpreters such as Unix shells, 4DOS/4NT and Windows PowerShell, which enables a replacement of a word by another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command...

     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

    The absence of a command history in COMMAND.COM was a serious inconvenience from 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 these also provide additional editing capabilities lacking in DOSKey, such as filename completion. Some of the better-known DOSKey alternatives are Chris Dunford's ced, Sverre Huseby's dosed, Ashok Nadkarni's cmdedit, Steven Calwas's Anarkey, Eric Tauck's Toddy, and Paul Houle's enhanced DOSKey.

    External links

    The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
     
    x
    OK