How do I get a directory listing for a folder on the web? I'm looking to download a group of small files from a folder on the web. I can do it easily with a a single file but I'm not sure how to do it for multiple files. If there was something similar to the code below but for a folder on the web I think I can do it.
private void button1_Click(object sender, EventArgs e)
{
DirectoryInfo di = new DirectoryInfo("c:/myFolder");
FileInfo[] rgFiles = di.GetFiles("*.*");
foreach (FileInfo fi in rgFiles)
{
//Do Something with each of them
}
}
The folder is just one from my web site. e.g. mysite.com/files
Thanks