How can you get the directory of the script that was run and use it within the .cmd file?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Raymond Chen has a few ideas:
Quoted here in full because MSDN archives tend to be somewhat unreliable:
Also the comments in the article are well worth scanning for example this one (via the WayBack Machine, since comments are gone from older articles):
This covers the use of %~dp0: