I have the following code in the attempt to output the result of two FINDSTR commands to a variable and print it to the screen. Something is going wrong though and I don't know what.
FOR /F "delims=" %%a in ('FINDSTR /I /c:"%_SUBJECT%" %_PATH%\%_LOG_BLACKLIST%" ^| FINDSTR /I /c:"%_FROM%"') do set _BLACKLIST=%%a
SET _PATH="\\server\c$\Program Files ^(x86^)\GFI\MailEssentials\Logs
The command works fine if I do not enclose it in a FOR loop. Any ideas?