Retrieving the number of Asynchronous tasks

Description

Use the AsyncTaskNumber property to return the number of tasks created by the UploadAsync, DownloadAsync and TransferURLAsync methods.

 

Syntax

Long Object.AsyncTaskNumber

 

Example

Set MySite = CreateObject("CuteFTPPro.TEConnection")

‘Initialize all necessary fields for MySite : host name, user, password,

etc.

MySite.Option("CleanupAsync") = False

MySite.DownloadAsync "/path/*.*"

MsgBox "task number created" & MySite.AsyncTaskNumber

 

Notes

You must set MySite.Option("CleanupAsync") = False so that all asynchronous tasks are counted. Otherwise, only the last asynchronous task launched will be referenced when calling the AsyncTaskNumber property.