I have a folder full of 30 thousand PDF files (please don't ask why).
I need to loop through them and match the date on the date value chosen on the windows form date picker control.
Here is what I have:
public List<FileInfo> myList = new List<FileInfo>();
DirectoryInfo di = new DirectoryInfo(@"\\PDFs");
myList = (di.EnumerateFiles("*.pdf").Where(x => x.LastWriteTime.Date == datetime.Date).ToList());
After I have got the files in the list, I then move them to another location for various other processing, but the aspect I definitely want to speed up is this part.
It's rather slow, is there anyway to speed this up?
Thanks.