SEB BEC

SEB BEC

  • 1.7k
  • 83
  • 1.2k

listing directories by date range

Apr 7 2023 4:48 AM

I have this code that lists all the subdirectories in a folder.

string path = @"C:\Temp\MyFolder";
DirectoryInfo dir_place = new DirectoryInfo(path);
DirectoryInfo[] directories = dir_place.GetDirectories();
foreach (var directory in directories)
{
    listBox.Items.Add(directory.Name);
}

How do I list only directories created based on a date range.  Basically, I pick a start date and an end date WPF?


Answers (3)