In tip 294 we learned how to create DOSKEY macros.

To open a Command Prompt with DOSKEY macros defined, modify the command prompt shortcut Target:

%SystemRoot%\system32\cmd.exe /k <Drive:>\path\file.cmd

where &ltDrive:>\path\file.cmd contains your macros.


%SystemRoot%\system32\cmd.exe /k  %HOMEDRIVE%%HOMEPATH%\Jerry.cmd

where %HOMEDRIVE%%HOMEPATH%\Jerry.cmd contains:

@echo off
doskey /macrofile=jsidoskey

and jsidoskey contains the doskey macros which you saved by typing:

doskey /macros > jsidoskey

If you want to see your macros being defined, then %HOMEDRIVE%%HOMEPATH%\Jerry.cmd would only contain the DOSKEY macros, such as:

doskey nd=md $1$Tcd $1
doskey CD=@CD /d $1
doskey qf=format A: /q