FTPGetFile overwrite problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Baumgarten (DavidBaumgarten_at_discussions.microsoft.com)
Date: 02/03/05


Date: Thu, 3 Feb 2005 08:35:09 -0800

I am trying to download a file from a ftp server and if the file already
exists to overwrite it.

Here is my code:
        FtpGetFile(hConnection, "1.pdf", FLocation & "\Temp\" & "1.pdf",
False, 1, 0, 0)

If file does not exists then this returns true and downloads file.
If file already exists then this returns false and doesnt download file.

fFailIfExists
[in] Iindicates whether the function should proceed if a local file of the
specified name already exists. If fFailIfExists is TRUE and the local file
exists, FtpGetFile fails.

I figured setting this to false would overwrite the file. Am I confused?

If its not possible to overwrite a file, anyone have other suggestions?



Relevant Pages

  • Re: recover deleted document. (recycle bin cleared)
    ... > overwrite the data area vacated by Windows, ... The downloaded file may overwrite the free space. ... Download on another pc. ...
    (microsoft.public.word.newusers)
  • Re: What exactly does "Apply Media Information Changes?" do?
    ... It looks like it will overwrite your files based on the naming ... convention set when you rip music.. ... I think it's suppose to download ...
    (microsoft.public.windowsmedia.player)
  • Re: Pesky Home Page
    ... overwrite the homepage on startup. ... the spyware in it and overwrites the homepage settings ... DO NOT download it. ...
    (microsoft.public.sqlserver.security)
  • Re: Help with (relatively) securely deleting files?
    ... > Bodo Eggert wrote: ... So download it. ... what you probably should do is overwrite each file in the ... In traditional filesystems, overwriting a file reuses ...
    (comp.security.unix)
  • Re: Unzip Files
    ... you'd have to download the remote .zip locally or create your own urlopener that has a seekmethod and uses HTTP Content-Rangeif the server supports it. ... If it's not a local file, download it to a local tempfile, and then proceed with that file the same as with the local file, only optionally deleting it when done. ... Since the ZipFile can take any file-like that allows for seek, memory permitting, you can even read the web-content into a cStringIO object without having to touch your filesystem. ...
    (comp.lang.python)