This can be done with Windows API
FindFirstFile
(
FindFirstFileEx
) /
FindNextFile
/
FindClose
. Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418%28v=vs.85%29.aspx[
^].
[EDIT: answering a follow-up question]
Pay attention that these functions find all file system objects in a current directory: both files and directories. Pay attention that the structure
_WIN32_FIND_DATA
has the field
dwFileAttributes
, the values of the fields are
FILE_ATTRIBUTE_…
constants, and one of the attributes is
FILE_ATTRIBUTE_DIRECTORY
. You can test if this bit is set in the field
dwFileAttributes
for each found item, and, if this is a directory, recursively find files in it.
Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365740%28v=vs.85%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/windows/desktop/gg258117%28v=vs.85%29.aspx[
^].
Is it clear now?
You could easily find this information by yourself.
—SA