Note the ""
at the beginning and at the end!
Run a program and pass a Long Filename
cmd /c write.exe "c:sample documentssample.txt"
Spaces in Program Path
cmd /c ""c:Program FilesMicrosoft OfficeOfficeWinword.exe""
Spaces in Program Path + parameters
cmd /c ""c:Program Filesdemo.cmd"" Parameter1 Param2
Spaces in Program Path + parameters with spaces
cmd /k ""c:atch filesdemo.cmd" "Parameter 1 with space" "Parameter2 with space""
Launch Demo1 and then Launch Demo2
cmd /c ""c:Program Filesdemo1.cmd" & "c:Program Filesdemo2.cmd""
CMD.exe (Command Shell)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…