[Solved] Only keeping lines in a textfile that start with specific characters


Try:

@ECHO ON
findstr /v "Lorem euismod" "%USERPROFILE%\Desktop\test.txt" > "%USERPROFILE%\Desktop\outfile.txt"
PAUSE

It deletes line 1 and line 2 in test.txt. I used Lorem euismod as reference.

Check out this link.

solved Only keeping lines in a textfile that start with specific characters