SaveFile

Ok. Can anyone tell me how to save a file as a folder format


Answer this question

SaveFile

  • kevinspace

    There is to my knowledge no mechanism available to download a full folder from HTTP. What you will need to do is -somehow- obtain a directory listing from the remote folder (which will be the trickiest part as this depends on whether the web server will give you this info) and then locally create the folder, and download file by file...

    Thanks
    Thomas Delrue



  • Jose g. de jesus jr. mcp mcdba

    I would just like to download a folder from my C: drive and save the folder to my desktop.

  • SithKitty

    Ok. See the problem with that is I am using a download method. with arguments for where the file is, and where to save it and what the name of the file is.

  • Swarna

    I'm not sure I understand your situation.

    Is it correct to assume that you are trying to save as a ZIP file (in that case, you can have a look at http://msdn2.microsoft.com/system.io.compression.gzipstream.aspx to help you in storing something compressed, but I don't know how to create ZIP-files)



  • MirceaT

    Ok thank you. This is what I was trying to avoid. But thank you for your help.

  • RichardMaletta

    Please tell us what you mean by "folder format". It is not a term I recognise.
  • dotnetto

    Ok. Can anyone tell me how to save a file as a folder format

    Link

    -------------

    You can use System.IO.Directory.CreateDirectory ()

    http://msdn2.microsoft.com/system.io.directory.createdirectory.aspx

  • graab

    No sir. I am using the WebClient.DownloadFile method.

     

    WebClient client = new WebClient();

    client.DownloadFile("http://69.15.98.29/desktop/" + listBox1.Text,

    @"C:\Documents and Settings\Admin\Desktop\hello.ini");

     

    the first argument tells where to download the file from. the second argument tells where to download the file to, and what to name it. I want to download a file from my C: to my desktop in a folder format.



  • SaveFile