Text file lines to variable

Microsoft Upg-vc msdos 6.22
November 5, 2010 at 05:07:46
Specs: Windows Vista, 7Gbyte Ram / Core 2 Duo 3Ghz
I have the simple problem of wanting to read the contents of a text file called: text.txt with the following contents.

0000
0001
0002
0003 and so on...


set yealink=001565
set model=14
set /p var=<Text.txt

wget 10.172.0.2:5481/provisioning/%yealink%%model%%var%

But the result i get from this is always: 001565140000
This is because the set /p var=<Text.txt command is only reading the first line of the text file.
Is there a way that each time i run wget in this loop that i can make the %var% to read a new line from the text file?


See More: Text file lines to variable

Report •


#1
November 5, 2010 at 06:34:59
set yealink=001565
set model=14
for /f %%v in (Text.txt) do (
wget 10.172.0.2:5481/provisioning/%yealink%%model%%%v
)

Report •
Related Solutions


Ask Question