|
DOSKEY
Calls Doskey.exe, which recalls Windows commands, edits
command lines, and creates macros.
Syntax
DOSKEY [options] [macroname=[text]]
Key
macroname : A short name for the macro.
text : The commands you want to recall.
options : for working with macros...
/MACROFILE=filename Specify a file of macros to install.
/MACROS Display all Doskey macros.
/EXENAME=exename Specify an executable other than
cmd.exe.
/MACROS:exename Display all Doskey macros for the
given executable.
/MACROS:ALL Display all Doskey macros for all
executables.
ALT+F10 Clear macro definitions.
options : for working with the Command Buffer...
/HISTORY : Display all commands stored in
memory.
/LISTSIZE=size : Limit the number of commands
remembered by the buffer.
/REINSTALL : Install a new copy of Doskey (clears
the buffer).
In normal use the command line is always in overwrite
mode, DOSKEY can be used to change this to Insert, the
insert key will always toggle from one to the other
/INSERT : By default new text you type at the
command line will be inserted in old
text.
/OVERSTRIKE : By default new text you type at the
command line will overwrite old.
Doskey.exe is always available for all character-based,
interactive programs, and maintains a command history buffer
and macros for each program that it starts.
With Doskey.exe, you can edit the current command line.
Examples
The /macros and /history command-line options are useful for
creating batch programs to save macros and commands. For
example, to store all current doskey macros, type:
doskey /macros > macinit
To create a batch program named Tmp.bat that contains
recently used commands, type:
doskey /history > tmp.bat
To define a macro with multiple commands, use $t to separate
commands, as follows:
doskey tx=cd temp$tdir/w $*
In the preceding example, the TX macro changes the current
directory to Temp and then displays a directory listing in
wide display format. You can use $* at the end of the macro
to append other command-line options to dir when you run TX.
Cmd Commands
|