BOOL PathIsDirectory( _In_ LPCTSTR pszPath ); //Verifies that a path is a valid directory. #include <Shlwapi.h>