DirectoryInfo directory = new DirectoryInfo(@"c:\");
DirectoryInfo[] folders = directory.GetDirectories("*", SearchOption.AllDirectories);
List files = new List();
foreach (DirectoryInfo info in folders)
{
foreach (FileInfo file in info.GetFiles())
{
files.Add(file.Name);
}
}