Scripting Example 43

; *****************************************************

; Example43.ftp

; =============

; This example shows how to use the Remote-DirExists()

; function.

; -----------------------------------------------------

; NOTE: You are able to execute the script unchanged...

; ****************************************************

 

; If you dial up without preset parameters, the application

; will open a dialog box, allowing you to specify the dialup

; parameters to use. Also, the Dial statement takes an

; optional parameter "silent" which will hide the dialup

; window which normally is displayed:

dial "silent"

 

Host="ftp.transsoft.com"

Password="˙OS'OILQ_SnTNO˙"

Port=21

User="anonymous"

 

; ******* Timeout in seconds...

Timeout=60

; ******* ...and then connect to FTP host...

 

connect

 

; ******* Command sequence...

 

; Check for an existing Directory:

if remote-direxists("pub") then

Beep "200"

Message "The Directory Exists"

endif

 

; Display the content of the variable "FtpCtrlDir" which

; contains the folder-path to Performer:

Message "%%FTPCtrlDir%%"

 

; ******* Afterwards, disconnect from host!

disconnect

 

hangup