G
Guest
Hi,
I wrote a.cmd, which calls b.cmd. Both a.cmd and b.cmd are located in the
same directory (in fact, in the same UNC share). I don't want to tell WHERE
to find b.cmd, because if I change the server or share name, my script won't
work any more. How can I do this ?
I tried to use %CD%, but it seems that if the startup directory is a UNC
share, it is unusable.
Maybe there is a way to get in a variable the complet filename of the .cmd I
am running : this way, I could run a path command to add the server/share
part to the current path. Besides, I could use the filename part to generate
a log file, such as %mybatchfilename%.log.
Can anyone help me ?
I wrote a.cmd, which calls b.cmd. Both a.cmd and b.cmd are located in the
same directory (in fact, in the same UNC share). I don't want to tell WHERE
to find b.cmd, because if I change the server or share name, my script won't
work any more. How can I do this ?
I tried to use %CD%, but it seems that if the startup directory is a UNC
share, it is unusable.
Maybe there is a way to get in a variable the complet filename of the .cmd I
am running : this way, I could run a path command to add the server/share
part to the current path. Besides, I could use the filename part to generate
a log file, such as %mybatchfilename%.log.
Can anyone help me ?