JSI Tip 0403 - How do I open a command prompt with my favorite DOSKEY macros defined?

Jerold Schulman

January 26, 1998

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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%system32cmd.exe /k pathfile.cmd

where <Drive:>pathfile.cmd contains your macros.

Example:

%SystemRoot%system32cmd.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


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like