I am currently running ftp via batch and have it set as a scheduled task. I want to add to my batch so that an email notification is sent out via email when the job fails. Here's my batch.
@echo off
rem Your FTP username
set ftpUser=USERNAME
rem Your FTP password
set ftpPass=PASSWORD
rem Your FTP server IP
set ftpIP=192.168.0.2
set ftpFile=%temp%\TempAcc.txt
>"%ftpFile%" echo.%ftpUser%
>>"%ftpFile%" echo.%ftpPass%
>>"%ftpFile%" echo bin
>>"%ftpFile%" echo mget *.*
start ftp -v -i -s:"%ftpFile%" %ftpIP%
thanx
email notification
Moderator: DosItHelp
Try the errorlevel. If it returns 1 or greater then there was an error and then you can start a program like SendEmail:
Code: Select all
http://caspian.dotconf.net/menu/Software/SendEmail/