I've been looking at strongm's posts in
and, in particular, the nifty code for ftp copying. However, I'm trying to suppress the "file already exists, overwrite?" prompt that can be triggered when initiating the copy. There is a flag that should suppress it but I'm having no success implementing it - i.e. the prompt continues to appear. Any suggestions? My code is:
and, in particular, the nifty code for ftp copying. However, I'm trying to suppress the "file already exists, overwrite?" prompt that can be triggered when initiating the copy. There is a flag that should suppress it but I'm having no success implementing it - i.e. the prompt continues to appear. Any suggestions? My code is:
Code:
Public Const FOF_NOCONFIRMATION = &H10&
.
.
Dim FtpFolder As Folder, LocFolder As Folder, myShell As Shell
Set myShell = New Shell
Select Case LCase(FtpMode)
Case "upload"
Set FtpFolder = myShell.NameSpace(FtpPath)
FtpFolder.CopyHere LocPath & FilNam, FOF_NOCONFIRMATION
Case "download":
Set LocFolder = myShell.NameSpace(LocPath)
Set FtpFolder = myShell.NameSpace(FtpPath & FilNam)
LocFolder.CopyHere FtpFolder, FOF_NOCONFIRMATION
End Select
Set FtpFolder = Nothing
Set myShell = Nothing