HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/bin/fullbackup/sendemail.cmd
itpSendEmail low surinder@itpartnership.com fullbackup@itpartnership.com "Full Backup Results" logtoday.txt

rem check for success
rem check if certain phrases exist, error if they do
find /i "550 RNFR command failed." logtoday.txt
if ERRORLEVEL 1 goto ok1 
goto error1
:ok1
find /i "451 Failure writing to local file." logtoday.txt
if ERRORLEVEL 1 goto ok2
goto error1
:ok2
find /i "553 Could not create file." logtoday.txt
if ERRORLEVEL 1 goto ok3
goto error1
rem (SS,17/11/09) added following
:ok3
find /i "Not connected." logtoday.txt
if ERRORLEVEL 1 goto ok4
goto error1
:ok4

rem check if certain phrases don't exist, error if they don't

find /i "230 Login successful." logtoday.txt
if ERRORLEVEL 1 goto error1

rem find /i "226 File receive OK." logtoday.txt
rem (SS,4/3/11) replaced above with following because 1and1 FTP server now returns "226 Transfer complete.", used to be "226 File received OK." Microsoft FTP servers always return "226 Transfer complete."
rem following returns "---------- LOGTODAY.TXT: 1" or "---------- LOGTODAY.TXT: 0" i.e file name followed by count
find /i /c "226 Transfer complete." logtoday.txt > findresult.txt
rem check for 1 in results, i.e. 1 successful transfer
find "1" findresult.txt
if ERRORLEVEL 1 goto error1

find /i "250 Rename successful." logtoday.txt
if ERRORLEVEL 1 goto error1

rem success if this point reached
goto end

:error1
itpSendEmail high surinder@itpartnership.com fullbackup@itpartnership.com "ITP ALERT!!! Full Backup FTP Failure" logtoday.txt

:end