void CWireLessDlg::CreatePakcetFile()
{
CString strFolderPath;
strFolderPath = _T("D:\\無線通訊板報文儲存資料夾");
if(!PathIsDirectory(strFolderPath))//判斷路徑是否存在
CreateDirectory(strFolderPath,NULL);//新建資料夾
strFolderPath = _T("D:\\無線通訊板報文儲存資料夾\\UDP");
if(!PathIsDirectory(strFolderPath))//判斷路徑是否存在
CreateDirectory(strFolderPath,NULL);//新建資料夾
}
轉載 https://www.cnblogs.com/judes/p/6541944.html