How to find if a file contains a given string using dos command line -
i trying create batch (.bat) file windows xp following:
if (file.txt contains string 'searchstring') (echo found it!) else(echo not found) so far, have found way search strings inside file using find command returns line in file finds string, unable conditional check on it.
for example, doesn't work.
if find "searchstring" file.txt echo found it! nor this:
if find "searchstring" file.txt=='' echo not found any ideas on how can done?
watch post.
accepted solution seems right 1 too.
Comments
Post a Comment