Re: Searching for files in chronological order

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



As I recall, the internal data structure sorting order for a particular
NTFS partition is frozen based on the system locale at the time when the
partition was created.

That seems to make more sense assuming it even maintains the files in sort
order. A lot of questions come to mind surrounding the issue however, like
why tools like the native Windows search utility have to sequentially search
all folders for a given file if things are properly sorted/indexed, but
that's another story.

BTW, as far as I know, there is no API-level requirement that states that
FindFirstFile/FindNextFile need to return files in a particular order.

I was recalling the situation from memory actually as I knew it was in there
the last time I looked (years ago probably). I just re-checked however and
they've now "enhanced" the documentation with a new caveat telling us not to
rely on the sort order but still informing us that it's in alphabetical
order on NTFS. This will only serve to confuse people IMO (novices in
particular):

http://msdn2.microsoft.com/en-us/library/aa364428.aspx


.