Reputation: 99
I'd just like to know if there is a way to call one doskey macro from another. I tried the following, but it doesn't work:
>doskey cleanpix=%PATH%\cleanpix.bat
>doskey cp=cleanpix
What am I doing wrong?
If there's no way to do what I'm trying to do, is there another way to define cp
to the same commands as the defintion of cleanpix
without typing all that shit out all over again? Besides CTRL+C, CTRL+V of course.
Upvotes: 9
Views: 1304
Reputation: 3700
I don't believe DOSKEY macros can call one another directly. You're probably better off using a quicky batch file like this. Create a file called (say) cp.cmd
and put it somewhere in your path. Its contents should be:
call %PATHTOCLEANPIX%\cleanpix.bat %*
One other note about your question - I assume that %PATH%
was an example for the question, and not the literal value you're trying to use. PATH
is a built-in environment variable that holds a list of directories where cmd
should look for executables.
Upvotes: 4