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.
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.
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...
SaveFile
OliWan
Link
-------------
You can use System.IO.Directory.CreateDirectory ()
http://msdn2.microsoft.com/system.io.directory.createdirectory.aspx
ab2
stige
JCaxaria
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.
Dan Ellis
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)
shakil852
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
ggunn
QuinnKirsch