Skip to main content

windows - How to call a program that contains space in filename?


I'm tried to run a command line something like this: start /max C:\Program files\foo\ba.exe -somearguments.


But I have a problem, the cmd returns an error message something like The system cannot found the C:\Program file and if I put the C:\Program files\foo\ba.exe around quotes, it simply run a new window cmd in MAX mode and don't run the program.


How to fix this?



Answer



All filenames and paths which contain spaces must be quoted.


Next, regarding your question, how about stating the path like:


start /max /d"C:\Program files\foo\" ba.exe -somearguments

Comments