GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing ss64.com — Doskey - recall commands command - Windows CMD DOSKEY.exeRecall and edit commands at the CMD Shell prompt, and create macros. Syntax
DOSKEY [options] [macroname=[text]]
Key
macroname A short name for the macro.
text The commands you want to recall.
Options:
/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
/HISTORY Display all commands stored in memory.
/LISTSIZE=size Set the number of commands to be remembered by the buffer.
(Maximum is 2,147,483,647)
/REINSTALL Install a new copy of Doskey (clears the buffer).
/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
/m /m: and /h are abbreviations for /macros /macros: and /history respectively.
These provide compatibility with old MS-DOS versions of DOSKEY.
You cannot run a Doskey macro from a batch file, when scripting use the full path to the executable or other task you need to run. In addition to the above, DOSKEY is loaded into memory for every cmd session so you can use Keyboard shortcuts at the command line. A DOSKEY macro will be effective for all text input during that session, for example when entering text at a SET /P prompt, if the text starts with a macro keyword, then DOSKEY will perform a substitution, just as if you are typing at the command line. [stackoverflow] The name of this command is a holdover from the old MS-DOS version, the CMD shell is not the same as DOS. Clearing History
Comments
Advanced macro definitions: $T If you put more than one command in a DOSKEY macro, use $T.
to separate them. Equivalent to & in a batch file.
$1-$9 Parameters, equivalent to %1-%9 in a batch file.
$* This represents ALL the parameters $1-9
Save and restore macro definitions
ExamplesA macro to open notepad:
Open a file with notepad:
Using the above macro:
Switch to the H: home drive:
Switch to your folder of batch files:
A macro called 'd' to run dir/w:
A macro to disable the FORMAT command:
“No man steps in the same river twice, for it’s not the same river, and he’s not the same man” ~ Heraclitus Related commandsCMD Syntax - Batch file macros Copyright © 1999-2026 SS64.com
Some rights reserved |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |