How to set the working directory of a command in a Windows batch file? May 2, 2023 by Tarik You could use the pushd/popd commands (help with pushd /?) Prog1.exe Pushd D:\SomeDir Prog2.exe popd Prog3.exe