So here is the folder I wish to select: Selected Folder using FBD
Within that BackPath folder are 7 other dated folders as shown: Dated Folders within selected folder
Within each of those dated folder are two more folders, named "In" and "Out".
What I want to do is just select the BackPath folder and then when I run my import method I want it to search through each of the dated folders and only look at the "Out" folders in each and ignore each "In" folder.
Here is my chooseInputFolder method:
private void ChooseInputFolder()
{
try
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Please Select An Input Path";
fbd.SelectedPath = @"C:\";
if (fbd.ShowDialog() == DialogResult.OK)
{
tbInputPath.Text = fbd.SelectedPath;
}
}
catch (Exception ex)
{
MessageBox.Show("Error Occured While Trying To Populate Combo Boxes : " + ex.Message);
}
}
Here is my foreach loop that looks in the selected directory:
foreach (var files in Directory.GetFiles(strPath))