email notification
Posted: 18 May 2009 07:52
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
@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