C
cptTech
I have the following piece of code in my batch file:
----------------------------
set getdate=true
for /f "usebackq skip=5 tokens=1" %%H in (`dir %%G`) do (
if %getdate%==true echo ^<i^> %%H^</i^> >> %filename%
set getdate=false
)
----------------------------
But when it gets to the IF statement inside the FOR loop, CMD tells me
that %getdate% is empty! My guess is that the %getdate% variable
inside the FOR loop is somehow different then that in the parent code.
Is there any way to reference this?
----------------------------
set getdate=true
for /f "usebackq skip=5 tokens=1" %%H in (`dir %%G`) do (
if %getdate%==true echo ^<i^> %%H^</i^> >> %filename%
set getdate=false
)
----------------------------
But when it gets to the IF statement inside the FOR loop, CMD tells me
that %getdate% is empty! My guess is that the %getdate% variable
inside the FOR loop is somehow different then that in the parent code.
Is there any way to reference this?