FTP Connection to Update a Web Site

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Sample Script Files >

FTP Connection to Update a Web Site

 

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

 

 

See also: List of Sample Script Files, Script File Wizard, Script Programming, Script Commands