hi,
i wanted to extract a nth line from a file using batch scripts.
@echo off
set LINES=0
for /f “tokens=* delims=eol” %%I in (123.txt) do (
set /a LINES+=1
IF LINES==6 (
echo %%I >> value1.txt
exit /b
)
)
i tried this but thi sis not working. could anyone suggest a way to hav eit done.
@echo off > newfile & setLocal enableDELAYedeXpansion
set N=
for /f “tokens=* delims= ” %%a in (myfile) do (
set /a N+=1
if !N! equ 3 >> newfile echo.%%a
)
=====================================
Life is too important to be taken seriously.
M2