Results 1 to 17 of 17

Thread: [RESOLVED] File download problem

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Resolved [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

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    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?

  3. #3

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    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

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: File download problem

    How do you download the file?

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: File download problem

    Someone else wrote this, but it is the best version to use:
    I think it wa Peet.
    Attached Files Attached Files

  6. #6
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    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

  7. #7
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    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.

  8. #8

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: File download problem

    i am using the URLDownloadToFile APi

  9. #9
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: File download problem

    Try the inet method. It should work fine.

  10. #10

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: File download problem

    Have half an idea on how to use inet, how do i download using it

  11. #11
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: File download problem

    Just add a reference to Microsoft Internet Transfer Control and add the following

    VB Code:
    1. Private Sub Form_Load()
    2.   Text1.Text = Inet1.OpenURL("http://members.aol.com/dandono/180205.txt", icString)
    3. End Sub

  12. #12
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: File download problem

    yay = inet1.openurl("www.google.com",icstring)
    will download the file

  13. #13

  14. #14
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    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.

  15. #15

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    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*

  16. #16
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: [RESOLVED] File download problem

    If you're in Europe I just might hold you on that for the beer

  17. #17

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width