FTP Connection to Update a Web Site |
Top Previous Next |
In this example, a connection is made with an FTP site and all older .jpg and .html files on the site are updated.
LOOPCOUNT 3 :LogonLoop ;; Logon to web site FTPLOGON "ftp.acme-widget.com" /timeout=60 IFERROR= $ERROR_SUCCESS goto Operation1 LOOPTO LogonLoop ;; Try again for up to 3 attempts STOP :Operation1 LOOPCOUNT 3 :FileLoop1 ;; Send all new HTML files SENDFILE "*.html" /ifnewer /timeout=60 IFERROR= $ERROR_SUCCESS goto Operation2 ;; Try again for up to 3 attempts LOOPTO FileLoop1 GOTO Disconnect :Operation2 LOOPCOUNT 3 :FileLoop2 ;; Send all new JPG files SENDFILE "*.jpg" /ifnewer /timeout=60 IFERROR= $ERROR_SUCCESS goto FileLoop3 ;; Try again for up to 3 attempts LOOPTO FileLoop2 :Disconnect FTPLOGOFF :Exit EXIT
|