|I believe this will do what you want. Please let me know if you need anything else.|
SET /P maxlines=Enter number of lines to be moved to new txt document:
SET /A linecount=0
FOR /F "delims=" %%A IN (textfile1.txt) DO (
IF !linecount! GEQ %maxlines% GOTO ExitLoop
ECHO %%A >> C:\users\username\desktop\textfile2.txt
SET /A linecount+=1
ECHO All Done.
ECHO Press any key to close this window.
UPDATE: Notice I updated Line 4 of my code. I made a mental note to fix it before posting, but forgot. All I did was add a ':' with a space after it so when you type in the number while running the batch file it looks cleaner.
Law of Logical Argument: Anything is possible if you don't know what you're talking about.