类似于VB里 Fso对象?
谢谢!

解决方案 »

  1.   

    判断一下这个文件存在吗
    CFileFind find;
    bool IsFinded = find.FindFile("C:\\Test.bmp");
    if(IsFinded)
    {
    //存在
    }
    else
    {
    //不存在
    }
      

  2.   


    CFileFind kk;
    if (kk.FindFile("c:\\kk.txt"))
    MessageBox("文件找到。");
    else
    MessageBox("文件没找到。");
      

  3.   

    PathFileExists
    Determines whether a path to a file system object such as a file or directory is valid. BOOL PathFileExists(
        LPCTSTR pszPath
        );Parameters
    pszPath 
    Full path of the object to verify. 
    Return Values
    Returns TRUE if the file exists, or FALSE otherwise. Call GetLastError for extended error information.
      

  4.   

    1.
    使用函数 BOOL PathFileExists(LPCTSTR pszPath);
    记得#include <Shlwapi.h>,链接Shlwapi.lib2.
    使用函数_access,记得#include <io.h>
    例子: bool bExist = (_access("c:\\test.txt", 0) != -1);
      

  5.   

    就这个函数就OK了GetFileAttributes