E=mc2
asked on
CuteFTP script to overwrite files in the destination folder
I would like to modify this CuteFTP script so that it automatically overwrites the files in the Destination path...
Currently when I run the VBS script it prompts me if I should overwrite, and I always have to say Yes.... I want to bypass that..
[code][/' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated at: 10/24/2018 10:10:10 AM.
' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.T EConnectio n")
' Initialize remote server host name, protocol, port, etc.
MySite.Host = "host.host.com"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 30
MySite.Delay = 30
MySite.MaxConnections = 4
MySite.TransferType = "AUTO"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = "login1234"
MySite.Password = "password1234"
MySite.SocksInfo = ""
MySite.ProxyInfo = ""
' Connect to remote server
MySite.Connect
MySite.DownloadAsync "/out", "\\srv\files\Inbound\FTPIn bound"code ]
Currently when I run the VBS script it prompts me if I should overwrite, and I always have to say Yes.... I want to bypass that..
[code][/' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated at: 10/24/2018 10:10:10 AM.
' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.T
' Initialize remote server host name, protocol, port, etc.
MySite.Host = "host.host.com"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 30
MySite.Delay = 30
MySite.MaxConnections = 4
MySite.TransferType = "AUTO"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = "login1234"
MySite.Password = "password1234"
MySite.SocksInfo = ""
MySite.ProxyInfo = ""
' Connect to remote server
MySite.Connect
MySite.DownloadAsync "/out", "\\srv\files\Inbound\FTPIn
ASKER
Thanks Bill, however this is not working.
ASKER
What I find that works, is the Synchronize method..
MySite.Synchronize "/remotefolder", "C:\LocalInbox\", 1, 1
MySite.Synchronize "/remotefolder", "C:\LocalInbox\", 1, 1
Sorry, that should have been:
»bp
MySite.FileOverwriteMethod = "OVERWRITE"
»bp
ASKER
Thanks Bill, however I tried that and it's still asking me if I want to overwrite files.. so I have to select it manually.
Seems like a bug, you might want to contact the vendor.
»bp
»bp
ASKER
Thanks ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
»bp