Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Firedawg

Email

Hi
I am new to writing batch files. I am looking to set up email notification if it failed or success for a upload. list below is my batch file.
@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\FTPLogs\VCAL.log" /ini=nul ^
/command ^
"open sftp://******:******/ -hostkey=""*********""" ^
"synchronize remote E:\VCAL /Diagnostics_******/VCAL" ^
"exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)

exit/b %WINSCP_RESULT%


The batch file works I just don't know how to setup the email. Please help