3 ms·
just use "pushd" instead of "cd" - as bonus you get directories saved to stack that you can "popd", much like unix.
by malkia 4y ago
just use "pushd" instead of "cd" - as bonus you get directories saved to stack that you can "popd", much like unix.
- malkia 4y agoI often start my .bat/.cmd files with @echo off pushd "%~dp0" e.g. no matter from where, ensure that the current folder is the folder of the .bat/.cmd file