Transferring from URLs Asynchronously (TransferURLAsync)

Syntax

Object.TransferURLAsync(BSTR bstrURL [, long nMultipartNumber])

Parameters

bstrURL

A string value for the URL for the file transfer (ftp://ftp.cuteftp.com/pub/cuteftp)

nMultipartNumber

An optional multipart parameter with default = 1

Example

Set MySite = CreateObject("CuteFTPPro.TEConnection")

MySite.TransferURLAsync "ftp://ftp.cuteftp.com/pub/cuteftp/english"

'this will transfer the entire English CuteFTP directory from the CuteFTP.com ftp site.

 

Normal Formats Supported

ftp://user:pass@ ftp.sitename.com:port

ftp://user:pass@ ftp.sitename.com

ftp://user@ ftp.sitename.com

ftp:// ftp.sitename.com:port

ftp:// ftp.sitename.com

ftp://ftp.sitename.com/pub l: user p: pass ß l: user is a lowercase "L", not "one"

ftp://ftp.sitename.com/pub:44 l: user p: pass

ftp://ftp.sitename.com/pub port:44 l: user p: pass

ftp://ftp.sitename.com/pub l/p: user/pass

ftp://ftp.sitename.com/pub:44 l/p: user/pass

ftp://ftp.sitename.com/pub p:44 l/p: user/pass

ftp://ftp.sitename.com/pub port:44 l/p: user/pass

ftp://ftp.sitename.com/pub l: user p: pass

ftp://ftp.sitename.com/pub:44 l: user p: pass

ftp://ftp.sitename.com/pub p:44 l: user p: pass

ftp://ftp.sitename.com/pub port:44 l: user p: pass

Extended URL Formats

Aside from the standard URL formats shown above, additional specifiers may be used to denote the direction of transfer and download path. Use the extended format to perform site to site transfers, uploads, targeted downloads, and more.

The standard url ftp://user:pass@ftp.host.com will be used in the following examples:

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com"

'download site to the default download folder

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com --> c:\temp"

'download site to the c:\temp folder

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <-- c:\web"

'upload files from c:\web to the site

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <->

ftp://user2:pass2@ftp.host2.com" 'perform a site to site transfer

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <== c:\web"

'synchronize (mirror local) the c:\web folder to the site

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com ==> c:\web"

'synchronize (mirror remote) the site to c:\web

MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <=> c:\web"

'synchronize both local and remote (mirror both)