This article suggests using DOSKEY to create command line macros. It cites one or two advantages and a couple disadvantages.
Instead of using DOSKEY I suggest you create ‘.bat’ files using notepad. (I have been doing this for years to run a sorted directory, change drive locations, etc, etc.) Type in the commands line by line… save file as a ‘.txt’ file and rename the extension to ‘bat’. Use long file names, descriptive file names, whatever…
Voila! A file that not only works from the command line but also works in Windows!! Forego DOSKEY for this ‘just-as-easy’ and MUCH more versatile approach.
Your mileage may vary…