MFC判断某路径下的目标文件是否存在

来源:互联网 发布:淘宝网店代运营 编辑:程序博客网 时间:2024/06/05 01:14



PathFileExists 函数可以用来查看一个文件或文件夹是否存在。

用法:

在头文件中

#include <shlwapi.h>

#pragma comment(lib,"Shlwapi.lib") //如果没有这行,会出现link错误

if (PathFileExists(strDBPath))
{
   //存在

}

else //不存在

0 0
原创粉丝点击