Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_findnext - what order are files found in?

Status
Not open for further replies.

Daih

Programmer
Dec 13, 2004
7
GB
I have a program that's used _findfirst() and _findnext() successfully for months, but today it went wrong because files were being found in non-alphabetical (ASCII) order.
What order are they meant to come in? (MSDN doesn't say.)
Can I somehow force it to find them in alphabetical order?

Thanks v much,
Daih
 
They come in any order the OS feels like. That's why you should never assume that . and .. will always be the first entries it returns. I too have found that most of the time, they are returned in alphabetical order. I think it might just read them in the order that they appear in the FAT table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top