Saved Bookmarks
| 1. |
Solve : find command? |
|
Answer» I WANT to find a string in file and PROMPT message if the count is >0. check the errorlevel, i think this is the right way round: but... Quote how to capture number of occurance in script??? But... Quote from: rao on January 29, 2009, 08:13:59 AM I want to find a string in file and prompt message if the count is >0. I read the original POST as MEANING the above, and capturing the occurances as an after thought to stop the output appearing on screen. I guess the OP can clear this up. FBYup you're right, the OP asked 2 different questions. By the way in Windows 200 and later these work Code: [Select]find "Hello" "C:\test.dat">nul && echo hello is present in the file Code: [Select]find "Hello" "C:\test.dat">nul || echo hello is not present in the file to get the count is slightly more complex and the OP should please say if that is what he or she wants. |
|