Use the S2Sxfer method to transfer a file from one remote site to another. You must use absolute path names for the source and target folders.
Boolean Object.S2Sxfer(BSTR bstrSourceName, BSTR bstrDestName, BSTR bstrPeerHost, BSTR bstrPeerLogin, BSTR bstrPeerPassword, long Port, BSTR bstrPeerProtocol);
bstrSourceName |
source file and folder name |
bstrDestName |
target file and folder name |
bstrPeerHost |
target host name |
bstrPeerLogin |
target login |
bstrPeerPassword |
target password |
Port |
target port |
BstrPeerProtocol |
target protocol (FXP can be applied for hosts with different protocols FTP, FTP-S) |
true |
Transfer was successful |
false |
Transfer failed |
Set MySite = CreateObject("CuteFTPPro.TEConnection")
‘Initialize all necessary fields for MySite : host name, user, password, etc.
MySite.Connect
MySite.S2Sxfer "/cftppro14.log", "/home/myfolder/cftppro14.log", "ftp.destinationhost.com", "username", "passwrd" 'everything else left as default