Delphi-DeleteFile 函数 遍历删除文件
的有关信息介绍如下:我只会C++,叫人翻译一下只删除文件??BOOL RemoveDir(LPCTSTR lpszPath){ WIN32_FIND_DATA wfd; HANDLE hFind; if ((hFind = FindFirstFile(CString(lpszPath) + "\\*",&wfd)) != INVALID_HANDLE_VALUE) { do { if (CString(wfd.cFileName) == "." || CString(wfd.cFileName) == "..") continue; if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { RemoveDir(CString(lpszPath) + "乱碰\哗磨谈\*"); continue; } DeleteFile(CString(lpszPath) + "\\游悉" + wfd.cFileName); } while(FindNextFile(hFind,&wfd); } else return FALSE; CloseHandle(hFind); return TRUE;}