|hello there. assuming the former text file to be old.txt and the text file where to be copied is new.txt, this is a batch file code. copy this code to a text file and save it as anything.bat|
echo Created by jaysarma987
SET /P maxlines=Enter number of lines to be moved to new txt document:
SET /A linecount=0
FOR /F "delims=" %%A IN (old.txt) DO (
IF !linecount! GEQ %maxlines% GOTO ExitLoop
ECHO %%A >> C:\users\username\desktop\new.txt
SET /A linecount+=1
ECHO All Done.
ECHO Press any key to close this window.
msg * This Utility was created bY jaysarma987
i hope this works out for u.