Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.CopyHere method prompt override

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
0
0
GB
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:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top