Is it possible, in one line, without a batch file to use findstr and only return a 0 %errorlevel% if all of the strings are found?
I am doing a gem list, which lists out a bunch of gems. I then want to use findstr/find to make sure that EACH string I search for exists. If one of them do not, then it should return a non 0 error code. Currently it will always return a 0 error code if any of the strings are found. It seems to work great with OR conditions, but not AND conditions. How can I do this?
C:... gem list | findstr "A B C D"
I only want a return code of 0 if it finds ALL of those. If D does not exist, it will still print out A B C, which gives the error code of 0.
Any ideas?