correct start:

Code:


if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
//////
}
else
{
//file
}