Computer Hope

Microsoft => Microsoft DOS => Topic started by: wbrost on May 28, 2009, 08:21:14 AM

Title: for loop help
Post by: wbrost on May 28, 2009, 08:21:14 AM
I am working on the following for loop.

Code: [Select]
FOR /f "usebackq tokens=1-10" %%I in ("test.text") do (
SET I=%%I& SET J=%%J& SET K=%%K& SET L=%%L& SET M=%%M& SET N=%%N& SET O=%%O& SET P=%%P& SET Q=%%Q& SET R=%%R& CALL :xml %%I
)

the problem is that the loop only starts processing on the line with 10 entries.

example of test.txt:
i j k l m
i j k l
i j k l m n o p q r
i j k

the loop will start on line 3 and process from there. Is there a way to force processing from the first line?