Re: Searching for files in chronological order

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




"Larry Smith" <no_spam@xxxxxxxxxxx> wrote in message
news:egENlXDMHHA.2028@xxxxxxxxxxxxxxxxxxxxxxx
Doesn't a call to FindFirstFile() and consequitive calls to
FindNextFile()
return files/directories in the same order they've been created? If so
first subdirectory found would be it.

No, it depends on the file system. In NTFS for instance it's returned in
alphabetical order.

Even on a FAT volume, the order returned is not guaranteed to be date
ordered. It's simply the next entry physically in the directory. It will
only be date ordered if no entries are ever deleted or changed.

--

- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools




.



Relevant Pages

  • Re: Indexing Service - Physically Sorting Files?
    ... > the NTFS PC but not with the FAT32 PC. ... That's just a feature of NTFS and the dir command. ... which may or may not be in alphabetical order. ... matter what the file system is. ...
    (microsoft.public.windowsxp.general)
  • Re: Searching for files in chronological order
    ... return files/directories in the same order they've been created? ... it depends on the file system. ... In NTFS for instance it's returned in ... alphabetical order. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Do You Defrag?
    ... explanation of what an MBR and FAT involves from wikipedia. ... My knowledge of the structure of the disk under NTFS is ... stuff like the difference between an MBR and a file system. ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Do You Defrag?
    ... That is prior to FAT unless you had a computer programmed by Bill Gates ... You don't need an OS to have a file system in place. ... NTFS writes it's own FAT in as the MBR. ... You have the source code for NTFS? ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Do You Defrag?
    ... explanation of what an MBR and FAT involves from wikipedia. ... My knowledge of the structure of the disk under NTFS is almost ZERO. ... stuff like the difference between an MBR and a file system. ...
    (alt.comp.hardware.pc-homebuilt)