I'm writing a .bat
script for Windows. Is there any command that I can use within the script to retrieve the directory that the script is in?
views:
38answers:
2I didn't ask for the current directory, I asked for the directory that the script is in.
cool-RR
2010-05-27 11:24:48
aw, was assuming you ran the script from the same directory
JoseK
2010-05-27 11:26:53
That's not always a valid assumption :-)
Joey
2010-05-27 14:28:48
+2
A:
from : http://ss64.com/nt/cd.html
In a batch file to display the location of the batch script file (%0)
ECHO "%~dp0"
Danail
2010-05-27 11:27:31