#include <shlwapi.h> // 要link shlwapi.lib
CString path = _T("C:\\foo.bar");
if( ::PathFileExists( path ) && !::PathIsDirectory( path ) ){
// 指定されたパスにファイルが存在、かつディレクトリでない
}else if( ::PathFileExists( path ) ){
// 指定されたパスがディレクトリである
}
#include <shlwapi.h> // 要link shlwapi.lib
CString path = _T("C:\\foo.bar");
if( ::PathFileExists( path ) && !::PathIsDirectory( path ) ){
// 指定されたパスにファイルが存在、かつディレクトリでない
}else if( ::PathFileExists( path ) ){
// 指定されたパスがディレクトリである
}