it works I just made a little edit to the script here is my edit:
@echo off setlocal enabledelayedexpansion set linecount=1 for /f "tokens=1 delims=" %%a in (FILENAME.txt) do ( set line!linecount!=%%a set /a linecount=!linecount!+1 ) echo %line1% echo %line2% echo %line3% pause
That's fine & thanks for coming back to share with us.
You will be aware that because there is no escape from the loop after processing the first three lines, if filename.txt contains more than three lines you are creating a variable for each line. No big deal tho'.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.