For information about Globalscape, visit www.globalscape.com. |
Use the Wait method to tell the Transfer Engine to hold all other tasks until a specific asynchronous task is completed. Then continue with the rest of the script.
Syntax
String Object.Wait (long taskIndex, long timeout)
Parameters
taskIndex |
This is the task index in the asynchronous tasks array. The default = -1 (which is current task). It can range from 0 to the total number of tasks minus one. |
timeout |
Determines how long (in milliseconds) to wait for a finished, cancelled, or error status before continuing with the script. |
Return Value
"CANCELLED" |
Transfer was stopped by the user |
"FINISHED" |
Transfer was successfully finished |
"ERROR" |
There were errors during the transfer |
"SKIPPED" |
The transfer was skipped (file overwrite rules) |
Example
Set MySite = CreateObject("CuteFTPPro.TEConnection")
'Initialize all necessary fields for MySite : host name, user, password, etc.
MySite.TransferURLAsync "ftp://ftp.cuteftp.com/pub/cuteftp"
strResult = MySite.Wait
If (strResult = "ERROR") then
MsgBox "warning! An error has occurred!"
End if
Configuration Notes
The default timeout value for the Wait method is 21,805,184 milliseconds, or approximately 6 hours.
The maximum possible value for timeout is 2,147,483,647 milliseconds, or just under 25 days.
You can set the Wait method to never timeout by using a timeout value of 0 (zero).
For hints on Wait method timeouts, see Timeout strategies.