I apologize as the logic is correct. overlooked the /v switch. But it seems as though for /f doesn't like the command dir | find. This is what I used to test. (directly in cmd not batch)
for /F %G IN (dir /s /a /b c:\test\ | find /v ".pdf") do "c:\Program Files\Mozilla Thunderbird\thunderbird.exe" -compose "to='
[email protected]',subject='Non-PDF File',preselectid='id',body='Please ensure that the entity is sending us a PDF file and not any other file type. Attached is the file in question.',attachment='%G'"
it returns:
"| was unexpected at this time."
i tried doing ("dir /s /a /b c:\test\ | find /v '.pdf'")
("dir /s /a /b c:\test\"|"find /v '.pdf'")
('dir /s /a /b c:\test\'|'find /v ".pdf"')
('dir /s /a /b c:\test\ | find /v ".pdf"')
all returning the same error.
it works fine if it's not a part of the FOR command however.
p.s. Yes I know it's not a move command