|I'm trying to read single lines from a text file and store each line in a variable so that I can use that variable to do something (such as COPY, RENAME, MOVE, etc). Here is the operation I want:|
1) Read 1st line from txt
1) Store that line in a variable so that I can do something with it (e.g. COPY)
2) Read 2nd line from txt
2) Store that line in the same variable (overwriting the previous info)
2) Run command using that var
3) Read 3rd line from txt
3) Store that line in the variable
...and so on.
Is this possible in Windows XP DOS? If so, how can it be done? My guess is a FOR loop is involved but I'm not sure after that.
(I posted this in WinXP forum but I don't know why they deleted it, maybe this is the right place)