none
Where Network.DownloadFile saves files? RRS feed

  • Question

  • I want to write a small downloader in SB, but when i'm trying to download any file, it doesn't save it, or saves in unknown location. Do anyone know, where files downloaded by Network.DownloadFile goes, or how to control it?

    Error 404: Signature Not Found :-)
    Friday, March 13, 2009 12:23 PM

Answers

  • This is a little deceptive as the method returns a file address of the temporary file that holds the contents of the URL (http://www.yahoo.com) that is dowloaded.  Try this!

    myfile=network.DownloadFile("http://www.yahoo.com")
    TextWindow.WriteLine(myfile)

    In the textwindow you should see something like:

    c:\documents and settings\Your Name\local settings\temp\tmpB0.tmp
    Press any key to continue...

    The tmpB0.tmp is the file that you are looking for.  For this one it is just the html listing of the yahoo page.

    Also, it is possible that your firewall may prevent the program from working.  For myself I have to turn mine off for the program to run successfully.

    JR
    • Marked as answer by MiST_PL Saturday, March 14, 2009 9:37 AM
    Friday, March 13, 2009 2:07 PM
    Answerer

All replies

  • This is a little deceptive as the method returns a file address of the temporary file that holds the contents of the URL (http://www.yahoo.com) that is dowloaded.  Try this!

    myfile=network.DownloadFile("http://www.yahoo.com")
    TextWindow.WriteLine(myfile)

    In the textwindow you should see something like:

    c:\documents and settings\Your Name\local settings\temp\tmpB0.tmp
    Press any key to continue...

    The tmpB0.tmp is the file that you are looking for.  For this one it is just the html listing of the yahoo page.

    Also, it is possible that your firewall may prevent the program from working.  For myself I have to turn mine off for the program to run successfully.

    JR
    • Marked as answer by MiST_PL Saturday, March 14, 2009 9:37 AM
    Friday, March 13, 2009 2:07 PM
    Answerer
  • Working very well, thanks!
    Error 404: Signature Not Found :-)
    Saturday, March 14, 2009 9:41 AM