I need to read a two line text file to create two varibles

December 15, 2011 at 13:46:38
Specs: Windows
I need to be able to have a batch file read from a two line text file and then insert those two varibles on two seperate commands.

See More: I need to read a two line text file to create two varibles

Report •

#1
December 16, 2011 at 00:41:44
Test this:

@echo off
cls
setlocal 

set /p lineone=<filename.txt

for /f "tokens=*" %%1 in (filename.txt) do (
    set linetwo=%%1
)

echo Lineone=%lineone%
echo Linetwo=%linetwo%



Please come back & tell us if your problem is resolved.


Report •

#2
December 16, 2011 at 10:08:51
Works GREAT!!! Thanks for the help.

Report •
Related Solutions


Ask Question