|The file z.txt has five lines all set as variables.|
Everytime one loop ends, the first line in z.txt is removed, however when the loop restarts , it is still setting the original five variables as variables despite z.txt having one less line. How can I refresh the loop everytime it restarts? If I delete the file z.txt at the end of the loop, the batch still sets the 5 variables once the loop starts again despite z.txt not existing anymore.Thank you.
for /F "tokens=*" %%A in (z.txt) do (
SET /A vidx=!vidx! + 1
(after removing the first line from z.txt here, the loop goes back to the start)