Hi! I wrote the following code to upload a text file to an ftp server. The code works fine, except that if a file with the same name already exists in the folder, i get a message asking if i want to overwrite it. I could ignore the message and it'll overwrite the file anyway after 30 seconds but I would like to know how to skip that pop up and just let the file be overwritten automatically. Please help! Thanks!
Code:
On Error Resume Next
Dim MySite
Dim myPath
Set MySite= CreateObject("CuteFTPPro.TEConnection")
MySite.Host = "ftp://usrname:pwd@ftpsite.com/data/"
MySite.Connect
If (Cbool(MySite.IsConnected)) Then
MySite.LocalFolder = "F:\exports"
myPath = "F:\exports\data.txt"
MySite.Upload myPath
MySite.Disconnect
MySite.Close
Set MySite = nothing
End If