Save this as .bat file, you will need to download bmail from beyondlogic.org
You will also need to change your ISP smtp server details and email from and to addresses.
The script below will email the synctoy log file, but sends the entire log file so over time I imagine this file could get quite large, would be nice if could get to just send the append data, if anyone knows.
Enjoy
Damo
@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run SyncToy Configure Folders in Application :::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Error Check, followed by bmail from beyondlogic.org ::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if errorlevel ( set result=FAILED
) else (
set result=OK
)
echo
bmail -s smtp.mailserver.ie -t (e-mail address removed) -f (e-mail address removed) -h -a "SyncToy Backup Completed Successfully" -m "C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log"
This script works great when started from command line. However I have made some adjustments to also have it work when executed through task scheduler.
Important is that you add the location and .exe for the bmail.exe file. If your bmail.exe is located at c:\ root then you should put;
c:\bmail.exe
I also updated the script for Windows 7 directory structure and latest Synctoy 2.1 version.
Because the log file can grow very big I also added a delete function that deletes the old logfile. So user will receive log of the latest sync in email.
See example below.
@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Delete old logfile first :::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
del C:\Users\username\AppData\Local\Microsoft\SyncToy\2.0\SyncToyLog.log
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run SyncToy Configure Folders in Application :::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Error Check, followed by bmail from beyondlogic.org ::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if errorlevel ( set result=FAILED
) else (
set result=OK
)
echo
c:\bmail.exe -s smtp.mailserver.ie -t (e-mail address removed) -f (e-mail address removed) -h -a "SyncToy Backup Completed Successfully" -m "C:\users\username\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log"