How to create batch file in Windows using “start” with a path and command with spaces

前端 未结 7 1547
孤独总比滥情好
孤独总比滥情好 2020-11-27 12:54

I need to create a batch file which starts multiple console applications in a Windows .cmd file. This can be done using the start command.

However, the command has

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 13:27

    Escaping the path with apostrophes is correct, but the start command takes a parameter containing the title of the new window. This parameter is detected by the surrounding apostrophes, so your application is not executed.

    Try something like this:

    start "Dummy Title" "c:\path with spaces\app.exe" param1 "param with spaces"
    

提交回复
热议问题