The following batch file does not execute as I thought it would.
REM *** START OF BATCH FILE ***
for /f %%a in ('dir /b') do (
echo a= %%a
echo abc= %abc%
REM *** END OF BATCH FILE ***
Let's say the output of the "dir /b" command is:
The output of my batch file should be:
Instead, I get:
It seems that the line "set abc=%%a" in my batch file fails to properly set the variable. Any idea why this does not work?