N
NayJo
I am attempting to nest two For statements like so:
for %%f in (*.log) do (
echo Processing %%f
for /F "tokens=3-5 delims=,/" %%m in (%%f) do (
echo Report Date is %%m%%n%%o
updatefile.exe %%m%%n%%o
goto L1
)
:L1
ren %%f %%f.bak
)
Problem is when I reach :L1 the var %%f seems to be uninitialized.
but when I leave the inner loop, the ren command does not seem to be
executed. I *could* process every line of the log file (ie. remove the goto
and the label) and get the desired result but is there any way just to
process only the first line?
Many thanks in advance.
John C.
for %%f in (*.log) do (
echo Processing %%f
for /F "tokens=3-5 delims=,/" %%m in (%%f) do (
echo Report Date is %%m%%n%%o
updatefile.exe %%m%%n%%o
goto L1
)
:L1
ren %%f %%f.bak
)
Problem is when I reach :L1 the var %%f seems to be uninitialized.
but when I leave the inner loop, the ren command does not seem to be
executed. I *could* process every line of the log file (ie. remove the goto
and the label) and get the desired result but is there any way just to
process only the first line?
Many thanks in advance.
John C.