Could anyone tell me how to list out all the files in a folder?
e.g. if I want to extract all the .jpeg files from a folder, how do i go about it?
Any help would be appreciated.
Thanks :)
Printable View
Could anyone tell me how to list out all the files in a folder?
e.g. if I want to extract all the .jpeg files from a folder, how do i go about it?
Any help would be appreciated.
Thanks :)
The CFileFind-class (of MFC) might be aqppropriate.
It's OS-specific, unless you use a cross-platform library like Boost.Filesystem. What OS are you on?
I am using Windows although I would be happy to port to Linux too.
And is there some Non-MFC alternative?
Thanks :)
Look up FindFirstFile and FindNextFile on MSDN.
Thanks A Lot!
Although ,it does not search directory within a directory.
Yep got it!
Supposed to AND FileAttributes with FILE_ATTRIBUTE_DIRECTORY
Thanks a bunch :)