Hi all, I have the following attached script that runs to search through a bunch of email files (*.eml) and delete them if they match any of the words in the 'spamwords.ext' file.
I need to modify the script so that instead of deleting the .eml files based on whether they match the words in 'spamwords.txt' they are moved to 'd:\email_archive', and then whatever is left in the folder after positive matches are moved is deleted.
Would someone be able to help me modify the script please?
for /f "tokens=*" %%w in (spamwords.txt) do (
for /f "tokens=* delims= " %%e in ('dir/b/a-d *.eml') do (
find "%%w" < %%e > nul
if not errorlevel 1 del "%%e"