Win32拷贝文件夹

下面的代码展示了如何拷贝文件夹: BOOL CopyDir(LPCTSTR lpszSrcDir, LPCTSTR lpszDstDir) { SHFILEOPSTRUCT sfo; ZeroMemory(&sfo, sizeof(sfo)); sfo.wFunc = FO_COPY; sfo.pFrom = lpszSrcDir; sfo.pTo = lpszDstDir; sfo.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR; int ret = SHFileOperation(&sfo); if ( ret == 0 ) return TRUE; else return FALSE; }

你可能感兴趣的:(Win32拷贝文件夹)