I would like to be able to find the most recently modified file in a directory that contains multiple words in the filename. The words can appear in any order in the file.
I have a line below that almost works. It’s fine for examples like this, (Test_File_Final.xlsx) but if the word Final was at the start of the filename it won’t find it. (Final_Test_File.xlsx)
String.Join("", Directory.GetFiles(FileLocationVariable,"* Test * File * Final * .xlsx",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).Lastwritetime).Take(1) )
Any help here is greatly appreciated.