text
stringlengths
0
4.23k
Syntax
doskey [/reinstall] [/listsize=<size>] [/macros:[all | <exename>] [/history] [/insert | /overstrike] [/exename=<exename>] [/macrofile=<filename>] [<macroname>=[<text>]]
Parameters
Parameter
Description
/reinstall
Installs a new copy of Doskey.exe and clears the command history buffer.
/listsize=<size>
Specifies the maximum number of commands in the history buffer.
/macros
Displays a list of all doskey macros. You can use the redirection symbol (>) with /macros to redirect the list to a file. You can abbreviate /macros to /m.
/macros:all
Displays doskey macros for all executables.
/macros:<exename>
Displays doskey macros for the executable specified by exename.
/history
Displays all commands that are stored in memory. You can use the redirection symbol (>) with /history to redirect the list to a file. You can abbreviate /history as /h.
/insert
Specifies that new text you type is inserted in old text.
/overstrike
Specifies that new text overwrites old text.
/exename=<exename>
Specifies the program (that is, executable) in which the doskey macro runs.
/macrofile=<filename>
Specifies a file that contains the macros that you want to install.
<macroname>=[<text>]
Creates a macro that carries out the commands specified by Text. MacroName specifies the name you want to assign to the macro. Text specifies the commands you want to record. If Text is left blank, MacroName is cleared of any assigned commands.
/?
Displays help at the command prompt.
<size>
>
<exename>
>
<exename>
<filename>
<macroname>
<text>
Remarks
Certain character-based, interactive programs, such as program debuggers or file transfer programs (FTP) automatically use Doskey.exe. To use Doskey.exe, a program must be a console process and use buffered input. Program key assignments override doskey key assignments. For example, if the program uses the F7 key for a function, you cannot get a doskey command history in a pop-up window.
You can use Doskey.exe to edit the current command line, but you can't use the command-line options from a program's command prompt. You must run doskey command-line options before you start a program. If you use Doskey.exe within a program, that program's key assignments take precedence and some Doskey.exe editing keys might not work.
With Doskey.exe, you can maintain a command history for each program that you start or repeat. You can edit previous commands at the program's prompt, and start doskey macros created for the program. If you exit and then restart a program from the same Command Prompt window, the command history from the previous program session is available.
To recall a command, you can use any of the following keys after you start Doskey.exe:
Key
Description
UP ARROW
Recalls the command that you used before the one that is displayed.
DOWN ARROW
Recalls the command that you used after the one that is displayed.
PAGE UP
Recalls the first command that you used in the current session.
PAGE DOWN
Recalls the most recent command that you used in the current session.
The following table lists doskey editing keys and their functions:
Key or key combination
Description