在
下面运行@echo off
setlocal enableDelayedExpansion
set "targetlocation=C:\Users\myself\Documents\FOLDER WITH BLANK SPACES\"
for %%f in (!targetlocation!*) do echo %%f
pause
打印:
C:\Users\myself\Documents\FOLDER
WITH
BLANK
Press any key to continue . . .
我尝试实现以下更改,但无法运行(请参阅下面的源代码)
for f/ "delim=" %%f in (!targetlocation!*) do echo %%f
答案 0 :(得分:1)
尝试:
set targetlocation="C:\Users\myself\Documents\FOLDER WITH BLANK SPACES\"