CFileFind and order in file search

Is there a way to order the file search made CFileFind::FindNextFile by say alphabetical order of the filenames, ascending order of LastFileModified etc ?.

Who is Participating?
mikeblasConnect With a Mentor Commented:
> are using alphabetical order


The files come back in an undefined order.  

Normally, the files come back in directory order; however that's a very implementation-dependent thing. What it exactly means is different for FAT, FAT32, NTFS, CDs, and remote files systems.

If you want a particular order, you need to build a list and sort it to that order for yourself.

..B ekiM
by using CFileFind::FindFile("*.*")
u are using alphabetical order
about Last Modified, MFC does not support that, u have to create ur own function
All Courses

From novice to tech pro — start learning today.