I recently needed to find a quick way to have a .cmd check for "specific string" in a .reg file, and delete that string and save new .reg file. This .cmd or .bat can be used to "Delete" specific line from .txt; .reg; .ini; etc. Example .cmd so, save the code as anyname.cmd:- BLUE=name of file to be checked RED=line of text to delete GREEN=name of file to save Code: @echo off Type Test.txt | findstr /I /V /C:"So, lets remove this line" >>Test2.txt exit Example Test.txt save this code as Test.txt:- Code: Example of using a .cmd file to remove a line of text:- Have a nice day. To err is human, but to forgive is divine. So, lets remove this line from this text as an example We will save edited text, minus the above line. now run the "anyname.cmd" while its sitting next to the "Test.txt"; and a new file named "Test2.txt" will be produced ... minus the "highlighted" line.