The DOS command findstr.exe can help you …find strings… in text files.
In conjunction with a for loop and tokenization, you can perform actions on the match results.
For example, the following command finds the string “Delivery Status Notification” in all “.eml” files in the current directory and move them to another directory:
for /f "tokens=*" %a in ('findstr /M /L /C:"Delivery Status Notification" *.eml') do move %a C:\temp\moved_emails
Hope this helps!