[RESOLVED] File download problem
I am downloading a small file from my web server, and it regulary changes, but when it downloads it saves to the temp file (or whatever it saves to), so the next time i ask it to download it simply referes to the saved temp file.
How do i get around this?
ILMV
Re: File download problem
I am not sure what you mean? You say 'it save to a temp file (or whatever it saves to)'? You dont know where it save the file or what?
Re: File download problem
Right, my program downlaods an XML file, which windows automatically saves to the Internet Temp file aswell as the directory you have selected.
So when you download it again, Windows takes it from the Temp folder.
On my PC the location is ...
C:\Documents and Settings\Ben\Local Settings\Temporary Internet Files\version.xml
Now i know where it is stored...
1) Is the the same for other versions of windows.
2) Is there a API or something to give the directory C:\Documents and Settings\# User Name#\Local Settings\Temporary Internet Files
Thanks
ILMV
Re: File download problem
How do you download the file?
1 Attachment(s)
Re: File download problem
Someone else wrote this, but it is the best version to use:
I think it wa Peet.
Re: File download problem
since its just like a text file, why dont you just use the inet control to download the .xml file and write it with some code. Thats how i check to see if my program needs to be updated :wave:
Re: File download problem
I didn't check the attachment. I remember having this problem. I use inet control for downloading. I am not sure if using Inet solved the problem. It was some time ago.
Re: File download problem
i am using the URLDownloadToFile APi
Re: File download problem
Try the inet method. It should work fine.
Re: File download problem
Have half an idea on how to use inet, how do i download using it :D
Re: File download problem
Just add a reference to Microsoft Internet Transfer Control and add the following
VB Code:
Private Sub Form_Load()
Text1.Text = Inet1.OpenURL("http://members.aol.com/dandono/180205.txt", icString)
End Sub
Re: File download problem
yay = inet1.openurl("www.google.com",icstring)
will download the file
Re: File download problem
Re: File download problem
I think it would be better to use:
Inet.Execute "http://www.somesite.com/somefile.xml, "GET"
Then Inet_StateChanged event to handle the download.
Re: File download problem
got it sorted now, the second link baja_yu sent was spot on.
Cheers guys, beers on me *insert beer here*
Re: [RESOLVED] File download problem
If you're in Europe I just might hold you on that for the beer :D
Re: [RESOLVED] File download problem
Cool, all my problems ave been ironed out,and my entire update app has snapped into place.
I love it :D