Download SD Library V4.1.5
Original forum post can be found here.

Written by Michael Lebert


I noticed that the DIR command to search for all files in a directory becomes extremely slow when large numbers of files are encountered. For example, with a little over 1000 files it could take a couple of minutes to complete. The modifications made to the library reduces this time to only a few seconds. I have also modified the routine that returns the size of a file without the requirement to open the file first.