muquit / mailsend

A program to send mail via SMTP from command line
Other
294 stars 68 forks source link

attach all files from a folder except subfolder #149

Open veronesem opened 4 years ago

veronesem commented 4 years ago

Dear All, im trying from weeks to runthis .bat file but without success. I need to write a script that select all the .txt files in the folder EPSON, without selecting the subfolders, then forward these files as attachments to a reporting email address. The script works if i type the exact name of the file but i have trouble with a multiple selection. Any idea? maybe i need to use a special symbol around ""?

cd C:\FTP_REPORT_VENDOR\EPSON\ MAILSEND_1.20b -smtp runner-it.mail.protection.outlook.com -f report@runner.it -t veronesem@runner.it -sub "EPSON REPORT" -M "Dear All, attached the requested report." -attach "C:*.txt"

pic