My Updated .bat to include a email notification upon copy completion
Foxidrive I did see your email-bat.cmd at
http://www.computerhope.com/forum/index.php?topic=132965.0But I think that's a little beyond me right now
It's not all contained in 1 file, but seems to work great.
:: Test Batch File to Copy Genie Backup file
:: to 2 Different Network Storage Devices.
:: If the Copy is Successful, Then I get a Successful Email.
:: If the Copy fails, Then I get a Failure Email.
:: Emails sent using Switmail (Setup Individually for each Backup)
:: Created 12-21-15, Aint Technology Wonderful
@echo off
set source=W:\Test
set dest1=X:\Test
set dest2=V:\Test
pushd "%source%"
for /f "tokens=*" %%G in ('dir *.gbp /b /a-d /od') do SET "newest=%%G"
copy "%newest%" "%dest1%"
IF %ERRORLEVEL%==0 (
SwithMail.exe /s /x "C:\home\GBM_Scripts\SwMail\1TB_Copy_Test_Success.xml"
) ELSE (
SwithMail.exe /s /x "C:\home\GBM_Scripts\SwMail\1TB_Copy_Test_Failure.xml")
copy "%newest%" "%dest2%"
IF %ERRORLEVEL%==0 (
SwithMail.exe /s /x "C:\home\GBM_Scripts\SwMail\3TB_Copy_Test_Success.xml"
) ELSE (
SwithMail.exe /s /x "C:\home\GBM_Scripts\SwMail\3TB_Copy_Test_Failure.xml")
:done
Maybe when I have more time & knowledge I try your email-bat.cmd
Have a Good Holiday