摘要:
void myCreateDirectory(CString source){ CString path; int pre_pos=source.Find(_T("\\")); int pos=0; path=source.Mid(pre_pos+1); CString create; pos=path.Find(_T("\\")); while(pos!=-1) { path=path.Mid(pos+1); pre_pos+=pos+1; create=source.Left(pre_po... 阅读全文
摘要:
void CopyDirectory(CString source, CString target,BOOL overwrite) { CreateDirectory(target,NULL); //创建目标文件夹 CFileFind finder; CString path; path.Format("%s\\*.*",source); bool bWorking = finder.FindFile(path); while(bWorking) { ... 阅读全文
摘要:
BOOL DeleteFolder(CString strFolder,BOOL bSelf/*=TRUE*/){ CFileFind finder; CString strWildcard(strFolder); strWildcard += _T("\\*.*"); BOOL bWorking = finder.FindFile(strWildcard); if (!bWorking) { finder.Close(); return FALSE; } BOOL bSuc=TRUE; while(bWorki... 阅读全文