判断指定路径文件夹是否存在,如果不存在就新建文件夹

void CWireLessDlg::CreatePakcetFile()
{
 CString   strFolderPath;
 strFolderPath = _T("D:\\无线通信板报文存储文件夹");
 if(!PathIsDirectory(strFolderPath))//判断路径是否存在     
    CreateDirectory(strFolderPath,NULL);//新建文件夹
 strFolderPath = _T("D:\\无线通信板报文存储文件夹\\UDP");
 if(!PathIsDirectory(strFolderPath))//判断路径是否存在     
    CreateDirectory(strFolderPath,NULL);//新建文件夹
}

posted @ 2017-03-13 11:36  朱小勇  阅读(3205)  评论(0编辑  收藏  举报