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/webbackup/sendemail (windows ftp client version).cmd
itpSendEmail low surinder@itpartnership.com webbackup@itpartnership.com "Web Backup Results" logtoday.txt

rem check for success
rem check if certain phrases exist, error if they do
find /i "426 Connection closed; transfer aborted." 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
:ok3
rem (SS,27/11/09) added following 2 checks
find /i "Not connected." logtoday.txt
if ERRORLEVEL 1 goto ok4
goto error1
:ok4
find /i "Invalid command." logtoday.txt
if ERRORLEVEL 1 goto ok5
goto error1
:ok5


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

rem (SS,29/4/12) replaced "230 User backup logged in." with "230 Logged on" for FileZilla
find /i "230 Logged on" logtoday.txt
if ERRORLEVEL 1 goto error1

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

rem find /i "226 File receive OK." logtoday.txt
rem find /i "226 Transfer complete." 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: 3" or "---------- LOGTODAY.TXT: 0" i.e file name followed by count
find /i /c "226 Transfer complete." logtoday.txt > findresult.txt
rem check for 3 in results, i.e. 3 successful transfer
rem SS,11/8/11 changed from 3 to 2, no longer backing up to dev.itpartnership.com
rem SS,27/4/12 changed from 2 to 1, ftp.ontheworldweb.com now using FileZilla which returns 226 Transfer OK instead of 226 Transfer complete.
find "1" findresult.txt
if ERRORLEVEL 1 goto error1
rem (SS,27/4/12) added following to check for "226 Transfer OK" from ftp.ontheworldweb.com / FileZilla
find /i "226 Transfer OK" logtoday.txt
if ERRORLEVEL 1 goto error1

rem success if this point reached
goto end

:error1
itpSendEmail high surinder@itpartnership.com webbackup@itpartnership.com "ITP ALERT!!! Web Backup Results" logtoday.txt

:end