* Log onto the FTP site. FTPLOGON 'site.remote' IFERROR RETURN * Change the current directory on the server FTPCD 'outgoing' IFERROR RETURN * Check the site for changes. FTPDIFF "*" "ftpsnapshot_test.sql" /append IFERROR RETURN :do_getdiff * Check the next difference, and remove the last one from the db FTPGETDIFF "ftpsnapshot_test.sql" /commitlast * An EOF error indicates that all files have been downloaded; IFERROR RETURN $ERROR_SUCCESS * if the difference is $DIFF_FILE_NOT_FOUND skip this file * and go back to the top of the loop IFNUM= %ftpdifffileid $DIFF_FILE_NOT_FOUND GOTO do_getdiff * the other difference types indicate that the site file is new or has changed, * so let's download it RCVFILE %ftpdifffilename IFERROR RETURN GOTO do_getdiff