I have this code:
string directory;
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
directory = fbd.SelectedPath;
txtSource.Text = directory;
DirectoryInfo d = new DirectoryInfo(directory);
FileInfo[] Files = d.GetFiles();
List<String> str = new List<string>();
foreach (FileInfo file in Files)
{
str.Add(file.Name);
}
}
I have a FolderBrowseDialog
where I select the Path of the folder.
In this selected folder are 3 other folders. I want to read out the names of these folders. I dont want to know or read out the names of files.