I am trying to open a folder within the MFC code and get its files or subfolders . Can anyone help me out with how to go about doing this. Is there a class like CFolder that I can use.
I would like to have a method for sorting the array AFTER the initial folder scanning.
Scanning & sorting takes time, especiall if I have 200.000 files to scan & sort (as I do).. the sorting really gets slower and slower. I need the folder scan to go quickly, and then I want to sort, then process the array, and then sort again, this time by date.. etc..
It's been three years, and not a word from you!
CFileInfo is an excellent class, I'm using it in many of my projects, but now it needs some maintenance. There are some nice suggestions from these people, and I have emailed you a couple of times about bugs and suggestions.
If you're not going to continue updating the class, perhaps you could hand over the torch to someone else? I'm volonteering, contact me at firstname.lastname@example.org
Of course we could all just continue to add our own little pieces of code to CFileInfo... but that's not very efficient or productive. Please get in touch!
Very very helpful solution for listing files & folders - btw!
I'm glad I found this posting!
I was having a bit of a problem with the sorting option, though,
because it always sorts the entire string (path+filename)
and that was problematic whenever I had folders that
started with the same letter as a file's name,
then all the alphabetical order was, in my opinion...
correct, but a little weird! ;-)
This is an example of a (++ small!) list generated
with AP_SORTBYNAME | AP_SORTDESCENDING
It is sorted properly alphabetically but causes a problem
if you want to keep all files from the same folder together: