A simple one for the experts community I am sure. I currently have a batch file which executes an action on a file based on it size.
FOR /R "C:\Pictures\" %%F IN (*.jpg) DO IF %%~zF GTR 2000000 Action2.exe <options> %%~sF
I am looking for a way to replace the file size check with a sub-string search of the output of another executable (Action1.exe). If the sub-string is NOT present, then execute Action2.exe
Walk directory structure
Execute Action1.exe on all .jpg files
If the output of Action1.exe does not contain the text "Sample" then execute Action2.exe on .jpg file.
Both Action1.exe and Action2.exe have options which must be passed to them.