DosKey is a TSR designed to assist working from the command line by making it easier to edit the command line, by remembering previous commands, and being able to record macros.
/B:xxx | Sets the size of the buffer for macros and commands. The minimum value of xxx is 256 and the default is 512 (bytes). If DOSKEY is already running, it must be reloaded (with /R) when changing the buffer size. |
/E:On|Off | Enables|Disables the display of commands when a macro plays. E(cho) is On by default. |
/F:filename | Retrieves filename - a text file containing a list of macros in the form Macroname=Text |
/H | Displays all commands stored in memory. (This list will not be redirected to a file). |
/I|O | Specifies whether text is entered in Insert or Overstrike mode by default. In either case the alternative mode can be selected with the [Insert] key but the default is reset as soon as [Enter]; is used. The default mode is Overstrike. |
/K:xx | Sets the size of the keyboard type-ahead buffer. The default is 15 (characters). If DosKey is already running, it must be reloaded (with /R) when changing the buffer size. |
/L | Sets the maximum size of the line edit buffer. The default is 128 (characters). |
/M | Displays a list of all DosKey macros currently in the buffer. This list can be redirected to a text file using standard Dos redirection (>) |
/R | Installs a new instance of DosKey. If DosKey is already running, the buffer is cleared of both macros and the Command Line history. Note that installing a new instance of DosKey does not remove the previous instance. Thus each use of /R takes another 5K of conventional/upper memory. |
/APPEDIT |
?Appears to have something to do with buffer size. needs /r switch |
/COMMAND |
?Accepted as a valid switch |
/PERMANENT |
?Accepted as a valid switch |
/SCRSIZE |
?Appears to have something to do with buffer size. needs /r switch |
/XHISTORY |
?Accepted as a valid switch. Something to do with excluding commands from the history perhaps. |
Left cursor | Moves the cursor back one character. (The character is not deleted). |
Right cursor | Moves the cursor forward one character. Will append the contents of the template to a command line entry (unless the command line entry has been generated from the Doskey buffer). |
Ctrl + Left cursor | Moves the cursor back one word.
|
Ctrl + Right cursor | Moves the cursor forward one word. Will append words from the template to a command line entry (unless the command line entry has been generated from the Doskey buffer). |
Home | Moves the cursor to beginning of line.
|
End | Moves the cursor to end of line. Does not add characters from the template. |
Up cursor
| Displays the previous command on the command line. Each press of the "up" key recalls an earlier command until the oldest command in the buffer is displayed. |
Down cursor | Displays the next command on the command line. Each press of the "down" key recalls a later command until the current (empty) command line is displayed. |
Page Up | Recalls the oldest command in the buffer |
Page Down | Recalls the most recent command in the buffer |
[Insert] | Toggles insert/overstrike mode. The default is reset as soon as a command is entered. |
[Esc] | Clears the command line. The template is also cleared but imediately regenerated from the last command in the buffer. |
F1 | Copies the next character from the template to the command line. |
F2 + key | Copies text from the template up to (but not including) key. |
F3 | Copies the template from the present character position to the command line. |
F4 + key | Deletes the characters from the present character position up to (but not including) key. |
F5 | Copies the current command to the template and clears the command line. |
F6 | Places an end-of-file character (^Z) at the current position of the command line. |
F7 | Displays a numbered list of the command history. |
Alt-F7 | Deletes all commands stored in the buffer. Does not clear the template. |
Chars + F8 | Entering one or more characters Chars followed by F8 will display the most recent command beginning with Chars. Pressing F8 again will display the next most recent command beginning with Chars, and so on. |
F9 + Command# | Displays the designated command on the command line. |
Alt-F10 | Deletes all macro definitions. |
Ctrl-T | Used to separate two commands entered on a single command line. |
The following special characters can be used in macros to control command operations:
$G | Redirects output - equivalent to the redirection symbol > |
$G$G | Appends output to the end of a file - equivalent to the append symbol >> |
$L | Redirects input - equivalent to the symbol < |
$B | Sends macro output to a command - equivalent to the pipe symbol | |
$T | Separates commands entered on a single command line in a macro - equivalent to Ctrl-T used from the command line. |
$$ | Use for the $ sign |
$1 to $9 | Represents any command-line parameters that can be specified when the macro is run. Comparable with the %1 to %9 characters in batch programs |
$* | Represents command-line information that can be specified when macroname is written. $* is similar to the replacable parameters $n except that everything typed on the command line after macroname is substituted for the $* in the macro. |