I'm trying to load multiple lines from file and set each line as parameter.
Here is my problem:
1. I have text file that contains several lines with one word
2. I count lines in file with:
Code: Select all
findstr /R /N "^" %temp%\_list.log | find /C ":" > %temp%\_count.log
set /p C1=<"%temp%\_count.log"
Code: Select all
for /f "delims== tokens=1,2" %%G in (%temp%\_list.log) do set /p %%H=%%G
Code: Select all
set /p =word1
set /p =word2
...
set /p =wordN
I need to get this:
Code: Select all
set /p param1=word1
set /p param2=word2
...
set /p paramN=wordN
I tried with:
Code: Select all
FOR /L %%H IN (1,1,%C1%) DO (
for /f "delims== tokens=1,2" %%G in (%temp%\_list.log) do set /p %%H=%%G
)
In advance, thanks for the help!!!