12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...


Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...



Recalls and edits commands at the DOS prompt and creates macros.


DOSKEY [/reinstall] [/listsize=Size] [/macros:[all | ExeName] [/history] [/insert | /overstrike] [/exename=ExeName] [/macrofile=FileName] [MacroName=[Text]]

/reinstall – installs the new copy of DOSKEY and clears the commands buffer.

/listsize – limits the size of the commands buffer with the Size commands.

/macros – lists DOSKEY macros. /macros:all displays macros for all executable files, /macros:ExeName displays macros for the specified file.

/history – displays the commands stored in memory.

/insert – inserts text when you type it.

/overstrike ‑ overwrites text when you type it.

/exename – specifies the executable file (ExeName) in which the DOSKEY macro runs.

/macrofile – specifies the file with the macros you want to install.

MacroName – name for the macro.

Text – command to be recalled.


You must use DOSKEY before using a program. To use DOSKEY, a program must be a console one and must use buffered input.

You cannot run DOSKEY macro from batch files.

/macros option can be shortened to /m, /history option can be shortened to /h.

You can use some advanced definitions while creating macros:

$G is equivalent to > in batch files (redirects output)

$G$G ‑ >> (appends output to the end of file)

$L ‑ < (redirects input)

$B ‑ | (sends macro output to a command)

$T ‑ & (separates commands)

$$ ‑ $ (dollar-sign character)

$1-$9 ‑ %1-%9 (parameters by their numbers)

$* ‑ everything after macro name.

To delete a macro type DOSKEY MacroName =


Macro to open Notepad:

DOSKEY np=notepad.exe


Subscribe batch files programming newsletter (no spam):