Find out what path a batch has been executed from

Get path

set batch_path=%~dp0

 

cd into it, remove last character

cd %batch_path:~0,-1%

 

change drive from a batch file that has been elevated
%~d0%

 

Posted on January 28, 2023, 8:02 pm By
Categories: tech tips Tags: