Download a folder to your computer

Asked

Viewed 392 times

0

In C# to download a file use the code:

using System.Net;
void Baixar(string url, string saida)
{
    WebClient wc=new WebClient();
    wc.DownloadFileAsync(new Uri(url), saida);
}

So far I haven’t found any well explained code regarding downloading folders from a server.

O.B.S.: When using this same code the application does not report any effect and the location where should download the files remains the same.

  • 1

    I don’t think there’s any way to recursive download paths and all files contained in that path... The method DownloadFileAsync can be used to download an individual file. You have to call that method once for each file.

  • 1

    One option is to compress the directory in a Zip and send as a file.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.