joscollin
July 25th, 2003, 07:58 AM
Hi,
I want to find whether the filenames listed by the MessageBox in the following code are directory names or not.
thanks
collin
int CClientDrives::GetFilesFromFolder(char *folderPath)
{
WIN32_FIND_DATA finddata;
strcat(folderPath,"\\*.*");
HANDLE hSearch = FindFirstFile(folderPath, &finddata);
if(hSearch != INVALID_HANDLE_VALUE)
{
while(FindNextFile(hSearch, &finddata))
{
if(strcmp(finddata.cFileName, ".."))
{
MessageBox(NULL, finddata.cFileName, NULL, 0);
}
}
}
FindClose(hSearch);
return 0;
}
I want to find whether the filenames listed by the MessageBox in the following code are directory names or not.
thanks
collin
int CClientDrives::GetFilesFromFolder(char *folderPath)
{
WIN32_FIND_DATA finddata;
strcat(folderPath,"\\*.*");
HANDLE hSearch = FindFirstFile(folderPath, &finddata);
if(hSearch != INVALID_HANDLE_VALUE)
{
while(FindNextFile(hSearch, &finddata))
{
if(strcmp(finddata.cFileName, ".."))
{
MessageBox(NULL, finddata.cFileName, NULL, 0);
}
}
}
FindClose(hSearch);
return 0;
}