How to sort directory files using last modified date and name

Hey @Old_Musical_Hits

Please try this:

folder_path = “D:\TestExcel” //
dir_info = new DirectoryInfo(folder_path)

dir_info.GetFiles().OrderByDescending(Function(x) x.LastWriteTime)

For further assistance please review this attached workflow and let me know :slight_smile:

Sort_Dir_files_last_modified.xaml (6.9 KB)

Regards…!!
Aksh

8 Likes