|Hello forum peeps :]|
I've seen plenty of batch file posts here but they don't quite do what i need (although still very helpful).
I would like a batch file to display a single word (or the whole line, doesn't matter which) from the first line of a .txt file, then if run again, display the second line of that file and so on until the last line of that file, then starting again from the first line.
I found this code that reads the first word in the file and displays it:
for /F "tokens=1 delims=," %%i in (myfile.txt) do @echo %%i
and then this code to display any line of the .txt file:
for /f "tokens=* delims= " %%a in (myfile.txt) do (
set /a N+=1
which is great, but i don't know how to add the bit about displaying the next line (or word) in the file if it's run again. Or maybe a different line of text depending on what day it is.
Maybe somebody can help me out. Thanks.