none
File download, extract & insert RRS feed

  • Question

  • Can someone please tell me how I would go about, asking the user to select a folder, downloading a .zip file form a website, extracting said .zip file to the selected folder from before?
    Sunday, June 10, 2018 1:53 AM

Answers

  • This could easily be done if you had an ASP.NET Web form program running on the Web server, assuming that you could deploy the ASP.NET program to the Web server and the Web server is IIS.

    https://weblog.west-wind.com/posts/2007/May/21/Downloading-a-File-with-a-Save-As-Dialog-in-ASPNET?utm_source=twitterfeed&utm_medium=twitter

    Based on the browser being use, IE, Chrome or Firefox would determine the look and functionality of the save dialog.  

    It's only file download functionality, be once the file is downloaded, you have to find other means to unzip the file and place unzipped files at a location. The O/S on the workstation should be able to unzip the file.

    • Marked as answer by Griffdith Sunday, June 10, 2018 11:14 AM
    Sunday, June 10, 2018 5:36 AM
  • If it is a zip file you can simply use the webclient download file method. 

    On this link is enough code given to do it. 

    https://msdn.microsoft.com/en-us/library/ez801hhe(v=vs.110).aspx

    If you cannot still solve it, then first take a course in .Net VB because otherwise you are just asking for the whole program.

    If you want more files at the same time then there is also an async method, but that page has no code. 


    Success
    Cor

    • Marked as answer by Griffdith Sunday, June 10, 2018 11:14 AM
    Sunday, June 10, 2018 7:34 AM

All replies

  • This could easily be done if you had an ASP.NET Web form program running on the Web server, assuming that you could deploy the ASP.NET program to the Web server and the Web server is IIS.

    https://weblog.west-wind.com/posts/2007/May/21/Downloading-a-File-with-a-Save-As-Dialog-in-ASPNET?utm_source=twitterfeed&utm_medium=twitter

    Based on the browser being use, IE, Chrome or Firefox would determine the look and functionality of the save dialog.  

    It's only file download functionality, be once the file is downloaded, you have to find other means to unzip the file and place unzipped files at a location. The O/S on the workstation should be able to unzip the file.

    • Marked as answer by Griffdith Sunday, June 10, 2018 11:14 AM
    Sunday, June 10, 2018 5:36 AM
  • You lost me & can that be done with just Visual Basic?
    Sunday, June 10, 2018 7:21 AM
  • If it is a zip file you can simply use the webclient download file method. 

    On this link is enough code given to do it. 

    https://msdn.microsoft.com/en-us/library/ez801hhe(v=vs.110).aspx

    If you cannot still solve it, then first take a course in .Net VB because otherwise you are just asking for the whole program.

    If you want more files at the same time then there is also an async method, but that page has no code. 


    Success
    Cor

    • Marked as answer by Griffdith Sunday, June 10, 2018 11:14 AM
    Sunday, June 10, 2018 7:34 AM
  • You lost me & can that be done with just Visual Basic?
    The VB.NET equivalent code. So you should be able to figure it out, assuming you have some knowledge using ASP.NET.
    Response.ContentType = "image/jpeg"
    Response.AppendHeader("Content-Disposition", "attachment"; filename=SailBig.jpg")
    Response.TransmitFile(Server.MapPath("~/images/sailbig.jpg"))
    Response.End()

    Sunday, June 10, 2018 7:47 AM