|Yes, it is possible, but that requires more advanced NT batch scripting. First of all start your batch by coding|
@echo off & setlocal EnableDelayedExpansion
That enables the delayed expansion of variables that must be referenced by the ! symbol instead of the usual %. To know more type Set /? at the prompt and you get an on-line quick (unfriendly) tutorial.
Here how to read the third line
for /F "delims=" %%j in (test.txt) do (
set /A line+=1
if !line! equ !myline! (set myvar=%%j& goto :DONE)
echo.Line #!myline! contains !myvar!