Script File Wizard Summary

Top  Previous  Next

 

The Robo-FTP Script File Wizard is useful to create basic script files. It is important to remember that Robo-FTP script language functionality is more extensive than what can be produced using the wizard. In complex applications, a wizard produced script file may not be adequate or is best used as a starting point.

 

The following is a sample script file produced with the wizard. This script file logs on to the Robo- FTP site and downloads a file from the Robo-FTP/outgoing directory.

 

;; Robo-FTP Script File

;; Created by Script File Wizard on Wednesday, July 19, 2000 at 14:14:19

;;

;; Notes: 1. Script commands always in all CAPS (e.g., SENDFILE)

;;        2. Script labels are Capitalized (e.g., :Exit)

;;

;; Description: Download a file from ftp.acme-widget.com

;; Select the default folder containing files for this session

WORKINGDIR %installdir

:Top

;; Define the number of times to try the DIALNET command

LOOPCOUNT 1

:DialLoop

;; Connect to an FTP site using Dial-Up Networking

DIALNET "MyConnection" /timeout=60

;; If the connect is successful, continue script processing from the Logon label

IFERROR= $ERROR_SUCCESS GOTO Logon

;; Tried DIALNET once...

LOOPTO DialLoop

;; Stop processing script and return to Robo-FTP user mode

STOP

:Logon

;; Define the number of times to try the FTPLOGON command

LOOPCOUNT 1

:LogonLoop

FTPLOGON "ftp.acme-widget.com" /timeout=60

;; If the logon is successful, continue script from the Operation1 label

IFERROR= $ERROR_SUCCESS GOTO Operation1

;; Tried FTPLOGON once...

LOOPTO LogonLoop

;; Stop processing script and return to Robo-FTP user mode

STOP

:Operation1

;; Define the number of times to try the FTPCMD command

LOOPCOUNT 1

:CommandLoop1

;; Send an FTP command to the FTP site

FTPCMD "CWD robo-ftp/outgoing"

;; Insert any additional commands here that may be necessary to handle server

;; response(s) to the command

;; ...

;; If the FTP command is successful, continue script from the Operation2 label

IFERROR= $ERROR_SUCCESS GOTO Operation2

;; Tried FTPCMD once...

LOOPTO CommandLoop1

;; continue script processing from the Disconnect label

GOTO Disconnect

:Operation2

;; Define the number of times to try the RCVFILE command

LOOPCOUNT 1

:FileLoop1

;; Retrieve a file from an FTP site

RCVFILE "xmtfile1" /timeout=60

;; If the receive file is successful, continue script from the Disconnect label

IFERROR= $ERROR_SUCCESS GOTO Disconnect

;; Tried RCVFILE once...

LOOPTO FileLoop1

:Disconnect

;; Disconnect from FTP site

FTPLOGOFF

;; Hang-up the phone

DISCONNECT

:Exit

;; Exit from Robo-FTP

EXIT