Get the latest created folder's creation date from a directory

please try this:

DirectoryInfo latestfolder = new DirectoryInfo(path).GetDirectories("*",SearchOption.AllDirectories).OrderByDescending(function(d) d.CreationTime).First();

it will return the latest created folder(last modified) directory.
and let me know :slight_smile:

and to get folder name and with date of creation see the attached sample.

Reference: latestdirdate.xaml (5.2 KB)

5 Likes