I have an xcopy batch job running and I would like to send myself a notification once it is completed. I am trying to use blat but cant seem to get it to work. Here is what I have so far. The backup job works fine no problem. I dont get any errors from the blat code but i dont get anything.
rem @echo off
xcopy E:\Shares\ y:\ /s /y /c /h > %log% 2>&1 && Goto
Echo %date% %time% There was an ERROR copying ACCT - Error %errorlevel% >>e:\shares\error.txt
C:\email\blat.exe -to email@example.com
server servername -f firstname.lastname@example.org -attach "e:\shares\error.Txt"
Echo %date% %time% There were no errors copying Fundbalance UB >>e:\shares
set subject="Backup successful"