Discussion:
alias usage
(too old to reply)
j***@googlemail.com
2009-05-15 17:28:06 UTC
Permalink
I have a lot of explicit references to programs in my bat files eg

c:\pas\jim.exe aa bbb

I'd like to be able to change the location of the programs eg to g:
\pas. Of course I can do this by editing the .bat files,. but is it
possible to do this with alias? ie to alias c:\pas\jim.exe to g:\pas
\jim.exe - I can't get it to work- something to do with the use of \
or :

eg alias c:\pas\jim.exe=`g:\pas\jim.exe`

I've triede with various types of quotes- no luck!

Anyone know whether thgis is possible?

Regards John
r***@highfiber.com
2009-05-16 15:46:50 UTC
Permalink
Post by j***@googlemail.com
I have a lot of explicit references to programs in my bat files eg
c:\pas\jim.exe aa bbb
\pas. Of course I can do this by editing the .bat files,. but is it
possible to do this with alias? ie to alias c:\pas\jim.exe  to g:\pas
\jim.exe - I can't get it to work- something to do with the use of \
eg alias c:\pas\jim.exe=`g:\pas\jim.exe`
I've triede with various types of quotes- no luck!
Anyone know whether thgis is possible?
Regards John
It works fine for me, in 4DOS and the current TCC. The name of the
alias has to exactly match the usage in your batch files -- quotes or
no quotes, extension or no extension.

Of course, this will fail if your batch files have an UNALIAS * near
the start, a fairly common practice. If you just need to replace one
drive letter with another, or a drive letter with a specific
subdirectory, then SUBST might be the better way to go....

--
Charles Dye

Loading...