Cannot overwrite local file upon downloading 
Author Message
 Cannot overwrite local file upon downloading

I wrote a little program using INET control for user upload/download files.
Upload works ok, users can overwrite existing files on the FTP server, but
files downloaded by users won't work if there is a file with the same file
name exist in the local directory. Is there anyway to overwqrite local file
using INET?
Thanks



Mon, 20 May 2002 03:00:00 GMT  
 Cannot overwrite local file upon downloading
Bill,
What you can do is an error trpping routine. I know for a fact that if the
file exsists that the Inet controls responsecode is 80 so what you can do is
this:

On error goto Filethere
blah balh
Filethere:
    If inet1.responsecode=80 then
        kill "the path and filename be sure to put in quotes unless using a
variable"
    End If
hope this helps!
Patrick Hill

Quote:
> I wrote a little program using INET control for user upload/download
files.
> Upload works ok, users can overwrite existing files on the FTP server, but
> files downloaded by users won't work if there is a file with the same file
> name exist in the local directory. Is there anyway to overwqrite local
file
> using INET?
> Thanks




Sun, 16 Jun 2002 03:00:00 GMT  
 Cannot overwrite local file upon downloading
Bill,
I know that if the file exsits that Inet's response code is 80 so this is
what you can do

On error goto FileThere
    code.....
    code....
FileThere:
    If Inet1.responsecode=80 then
        Kill "Path and filename" (must be in quotes unless usinf a variable)
        Inet1.Execute Inet1.URL, "Get " & SourceFile & " " & DestFile
    End if

Hope this helps!
Patrick Hill


Quote:
> I wrote a little program using INET control for user upload/download
files.
> Upload works ok, users can overwrite existing files on the FTP server, but
> files downloaded by users won't work if there is a file with the same file
> name exist in the local directory. Is there anyway to overwqrite local
file
> using INET?
> Thanks




Sun, 16 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Cannot overwrite local file upon downloading

2. Cannot overwrite local file upon downloading

3. Highlighting data in the text portion of a combo box and overwriting it upon data entry

4. Running a local bat file without the download dialog box prompt

5. Download files from server to a specific path on user's local harddrive

6. Download files from server to a specific path on user's local harddrive

7. Download remote file to local drive

8. Cannot print from VB 6.0 application to Local Printer

9. Cannot enable a local account via Win32 API

10. Cannot enable a local account via Win32 API

11. Cannot download ActiveX control into IE3.0

12. tacking files upon the end of exe's

 

 
Powered by phpBB® Forum Software