Set a path variable with spaces in the path in a Windows .cmd file or batch file December 10, 2022 by Tarik Try something like this: SET MY_PATH=C:\Folder with a space "%MY_PATH%\MyProgram.exe" /switch1 /switch2