Perhaps this will make more sense to you.

The order that $findfile matches is based on your system's FAT table. The order is typically by creation or modification of the file (often depends on how a program overwrites the file), so you'll get older files first and newer files last.

When you defragment your harddrive however, many defrag programs will sort your FAT table by file name. This would cause $findfile to give mostly alphabetical listings, and then newer files mixed up at the end.

FindFirstFile/FindNext functions are part of Windows API, and are accessable in C++, Visual Basic and other actual programming languages. As said earlier, $findfile simply calls these functions for you. (Just reiterating this to avoid any confusion)

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!