Batch File: FOR /F doesn't work if path has spaces

后端 未结 3 2003
粉色の甜心
粉色の甜心 2020-12-06 16:54

This is the problem I\'m having:

@ECHO OFF

REM If this batch file is run in the same directory as \"command.exe\" then the
REM following line will work.
FOR         


        
3条回答
  •  鱼传尺愫
    2020-12-06 17:29

    Add CALL before the program name:

    FOR /F "usebackq" %%A IN (`CALL "C:\Folder With Spaces\command.exe" "C:\File Being Passed as a Parameter.txt"`) DO ECHO %%A
    

提交回复
热议问题