|Hey all |
if command Isn't working for me
I might be doing something wrong..
In "file.txt" is the text "hello world"..
Type file.txt | findstr "hello world"
If %errorlevel% EQU 0 ( echo yes found text
) else (
Echo not found
But even if the text isn't found or not there
It still returns a errorlevel of zero which is suppose
To be when findstr works (zero means it worked)
Is this wrong ?
Maybe another way to do this ?