What is the best way to find a needle in a haystack?
Posted on 2005-04-11
I have a folder that is filled with files. At least 3 gigs of files to be precise. I am looking for just one file and I use For Each filecollection to wade through this huge folder in my VB application. It takes about 7 minutes to complete the process of finding the file. The file that I am looking for is among about five files that were created today, or I should say the current day. This process is done everyday. Is there a way that I can just sort through the current days files and not have to go through the big pile of files? I cannot clean-out the other files so Im looking for a better way to find a needle in a haystack. Once my app find a file that matches my filter I use FSO to give me the last date modified then I compare it to the current system date, works just fine but my app takes all the CPU and just seems inefficient. Any ideas would be greatly appreciated.