Get current batchfile directory

Very simple:
setlocal
cd /d %~dp0
File.exe
You can also do
 Pushd "%~dp0"
Which also takes running from a unc path into consideration.

1 comment:

Pages