How do I get the lastest file in the folder

Directory.GetFiles(folder_path,“.xlsx”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1)

8 Likes