I have a code snippet in a bat file which reads a text file and echos each line like this.
This one works.
FOR /F "tokens=*" %%i IN (tags.txt) DO (
@ECHO %%i
)
This one does not work. (Echos tags.txt)
set file="tags.txt"
FOR /F "tokens=*" %%i IN (%file%) DO (
@ECHO %%i
)
What is wrong?