Usage of doskey
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. |
| Displays all DOSKey macros for all executables which have DOSKey macros. |
| 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 shortcuts can be used:
| Up and Down | 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 |
DOSKey implements support for command macros, a simple text-substitution facility which is used somewhat like command line aliases in other environments. DOSKey macro definitions can use the following special codes:
| $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. |
copy from: http://en.wikipedia.org/wiki/DOSKey

浙公网安备 33010602011771号