Batch files to find certain line of text in files

Dell / Inspiron 9100...
February 3, 2012 at 20:21:39
Specs: Windows XP, 3.192 GHz / 1023 MB
i want make a batch file that can search for a certain line of text in a .txt or another .bat file. say i have a text file with the line a text-

-this is a batch file

then when i run the batch file it searches the specified .txt file and if it finds the above text it continues, if it doesnt then the batch file closes. kind of like the if exist and if not exist commands but instead of file names i need to use text in a file. any ideas

If you can't play youtube (320p) on newer computers, then you know you got ripped off


See More: Batch files to find certain line of text in files

Report •


#1
February 4, 2012 at 00:21:54
find "-this is a batch file" anyfile.bat
if errorlevel 1 goto end


Report •
Related Solutions


Ask Question