Running below
@echo off
setlocal enableDelayedExpansion
set "targetlocation=C:\Users\myself\Documents\FOLDER WITH BLANK SPACES\"
for %%f in (!targetlocation!*) do echo %%f
pause
prints:
C:\Users\myself\Documents\FOLDER
WITH
BLANK
Press any key to continue . . .
I tried to implements the following change, but it fails to run (see source below)
for f/ "delim=" %%f in (!targetlocation!*) do echo %%f