For information about Globalscape, visit www.globalscape.com. |
Use the TransferURLAsync method to start a download from a web address, and return control to the script immediately. This method does not wait for the transfer to end. You can use it to perform many simultaneous transfers.
Immediately after you call this method subsequent methods in your script will be called, so be careful when timing certain events.
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:
Format: Normal URL transfer
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com"
'download site to the default download folder
Format: URL [space] "-->" [space] LPATH
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com --> c:\temp"
'download site to the c:\temp folder
Format: URL [space] "<--" [space] LPATH
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <-- c:\web"
'upload files from c:\web to the site
Format: URL1 [space] "<->" [space] URL2
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <->
ftp://user2:pass2@ftp.host2.com" 'perform a site to site transfer
Format: URL [space] "<==" [space] LPATH
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <== c:\web"
'synchronize (mirror local) the c:\web folder to the site
Format: URL [space] "==>" [space] LPATH
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com ==> c:\web"
'synchronize (mirror remote) the site to c:\web
Format: URL [space] "<=>" [space] LPATH
MySite.TransferURLAsync "ftp://user:pass@ftp.host.com <=> c:\web"
'synchronize both local and remote (mirror both)