General discussion


Error Log using a batch file

By ma_sami ·

I have a batch file which seraches for a text file and send as email attachement using smtp client sendemail.exe,below is the code for same.

for /f "tokens=* delims= " %%a in ('dir/b *.txt') do (set str=%%a)

start sendemail -f -t -u Subject -m Message Body -s -a %str% -xu UserName -xp Password

How can we create a log file and save the result either success or failure along with the error message?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums