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_pos); CreateDirectory(create,NULL); pos=path.Find(_T("\")); } create+=_T("\")+path; CreateDirectory(create,NULL); }