windows cmd: problems with for /f with a quoted command with quoted parameters

后端 未结 2 685
野趣味
野趣味 2020-12-02 00:13
for /f \"delims=\" %%a in (\'\"%systemRoot%\\system32\\find.exe\" /?\') do @echo %%a

Yes, the previous line works. Not much useful but works. But t

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 01:03

    It is somewhat easier to put the first token from the instruction of the for-loop into a token without quotes.

    for /f "delims=" %%a in (
    ' if defined OS "C:\my folder with spaces\consoleapp.exe" /param1:"value" '
    )do @echo %%a
    

提交回复
热议问题