I have a folder which contains all error files of our system. For reporting purposes I would like to be able to get all files past a certain date. For example, all files from the last two weeks.
Currently i do this:
fileSearchList = Directory.GetFiles(folderPath) for each f in fileSearchList IF: File.GetLastWriteTime(f) > CDate(startingDate) Get file
This is slow since it first gets all the files (5000 of them) while i only really need the first (~200). Is there any way to filter with Directory.GetFiles? The filenames do not contain any information regarding it’s date.