|I have a batch file that I would like to log. I don't want the log to be of infinite length, but I also don't want it to be deleted every time.|
Here's what I was thinking:
del log9.txt /q
for /l %%i in (8,-1,0) do set /a j=%%i+1 &&
ren log%%i.txt log%j%.txt
But it doesn't work. J shows up empty. If I change the set command to
set /a j=i+1 J isn't empty, but it doesn't change either.
With only 9 files to change, I could just do commands one-by-one, but I'd really rather my for loop work.