First, apologies for my poor coding ability, however I have spent a few hours reading the forums and giving it a crack, so I would really appreciate any help with the follow
You could read the lines with another construct.
setlocal EnableDelayedExpansion
< %1 (
Set /p line1=
Set /p line2=
Set /p line3=
Set /p line4=
Set /p line5=
Set /p line6=
Set /p line7=
)
Echo %1,!line3!,!line5!,!line7!
Or with a loop (Andriy)
Setlocal EnableDelayedExpansion
<%1 (
For /L %%n in (1 1 7) do (
Set /p line%%n=
)
)
Echo %1,!line3!,!line5!,!line7!