char lpPath[MAX_PATH];
memset(lpPath,0,MAX_PATH);
GetTempPath(MAX_PATH,lpPath);
CFileFind tmpfile;
CString szTempPath;
szTempPath.Format (lpPath);
AfxMessageBox(szTempPath);
BOOL bFinded = tmpfile.FindFile (szTempPath+"wmv*.tmp",0);
while (bFinded)
{
bFinded = tmpfile.FindNextFile ();
CString szdel = tmpfile.GetFileName ();
//AfxMessageBox(szdel);
DeleteFile(szTempPath+szdel);
}
tmpfile.Close ();
AfxMessageBox("已把"+szTempPath+"目录下的所有/"wmv*.tmp/"文件清理完!");