| || |
Start command path with spaces
I am opening a .bat file from my java class.
Below is the code:
String batchFilePath = "path with spaces/test.bat"
String startCommand = "cmd.exe /c start /b ";
String runBatchFile = startCommand + batchFilePath;
But if my path has spaces its not opening test.bat file
If path with no spaces is given, Its executing my test.bat file.
Re: Start command path with spaces
This is a QTP form and not Java. You should search this on a Java forum. Just as a suggestion you can try below
String batchFilePath = "\"path with spaces/test.bat\""