SET origfile="C:\Documents and Settings\user\Desktop\test1\before.txt"
SET tempfile="C:\Documents and Settings\user\Desktop\test1\after.txt"
FOR /F %%C IN ('FIND /C /V "" ^<%origfile%') DO SET totallines=%%C
<%origfile% (FOR /L %%i IN (1,1,%totallines%) DO (
SET /P L=
IF %%i==%insertbefore% ECHO(