JSI Tip 3855. How do I determine the path that a batch file is run from?

Jerold Schulman

July 1, 2001

1 Min Read
ITPro Today logo in a gray background | ITPro Today

In tip 0494, I described the parsing of batch parameters.

To parse the path of the batch file, use:

%~dp0




Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like