How to detect subdirectories
-
e.g I have a variable CString path; How can I find out the subdirectories of this folder?
look at FindFirstFile() FindNextFile() its in the returned flags value --- "every year we invent better idiot proof systems and every year they invent better idiots"
-
look at FindFirstFile() FindNextFile() its in the returned flags value --- "every year we invent better idiot proof systems and every year they invent better idiots"
-
Thanks! can I use FILE_ATTRIBUTE_DIRECTORY in the WIN32_FIND_DATA structure, to find subdirectories? One more question: these functions return a handle. How can I find out what the name of the directories is?
as far as i remember the cFileName member holds the file / directory name :) --- "every year we invent better idiot proof systems and every year they invent better idiots"
-
Thanks! can I use FILE_ATTRIBUTE_DIRECTORY in the WIN32_FIND_DATA structure, to find subdirectories? One more question: these functions return a handle. How can I find out what the name of the directories is?
WIN32_FIND_DATA is a struct: typedef struct _WIN32_FIND_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; DWORD dwReserved0; DWORD dwReserved1; TCHAR cFileName[ MAX_PATH ]; TCHAR cAlternateFileName[ 14 ]; } WIN32_FIND_DATA, *PWIN32_FIND_DATA; this is in MSDN welcome you to Sky...