I am trying to create a batch (.bat) file for windows XP to do the following:
If (file.txt contains the string 'searchString') then (ECHO found it!)
ELSE(ECHO not found)
So far, I have found a way to search for strings inside a file using the FIND command which returns the line in the file where it finds the string, but am unable to do a conditional check on it.
For example, this doesn't work.
IF FIND "searchString" file.txt ECHO found it!
Nor does this:
IF FIND "searchString" file.txt=='' ECHO not found
Any Ideas on how this can be done?