如何复制多个文件夹(注意是多个)

naixian1983 2008-02-18 09:23:38
小弟我用SHFILEOPSTRUCT只可以复制一个文件夹,但如何同时复制多个文件夹呢?除了SHFILEOPSTRUCT还有别的方法马?
...全文
943 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingpang 2008-02-18
  • 打赏
  • 举报
回复
把复制一个文件夹的那个代码写成函数如CopeFolder(CString StrSourceFolder,CString StrDestFolder);
有几个就调用几个
CopeFolder(_T("C:\\1")_T("D:\\"));
CopeFolder(_T("C:\\2")_T("D:\\"));
CopeFolder(_T("C:\\3")_T("D:\\"));
......
可以吗?
naixian1983 2008-02-18
  • 打赏
  • 举报
回复
问题还没解决
chmdcr 2008-02-18
  • 打赏
  • 举报
回复
mark
jjfwenwenti 2008-02-18
  • 打赏
  • 举报
回复
pFrom
Address of a buffer to specify one or more source file names. Multiple names must be null-separated. The list of names must be double null-terminated.
pTo
Address of a buffer to contain the name of the destination file or directory. The buffer can contain multiple destination file names if the fFlags member specifies FOF_MULTIDESTFILES. Multiple names must be null-separated. The list of names must be double null-terminated.
naixian1983 2008-02-18
  • 打赏
  • 举报
回复
楼上,请讲详细点马?
msdn是这样说的
pFrom
Address of a buffer to specify one or more source file names.
但我现在只可以选择一个文件夹,如何同时选择多个文件夹?
菜牛 2008-02-18
  • 打赏
  • 举报
回复
你仔细看看说明。
ToperRay 2008-02-18
  • 打赏
  • 举报
回复
xcopy

seach
cnzdgs 2008-02-18
  • 打赏
  • 举报
回复
pFrom可以包含多个文件路径,各个路径字符串首尾相接,最后再多加一个'\0'表示后面没有其它文件了。pTo也是这样的用法。pFrom中的文件路径中还可以使用通配符*。
WizardK 2008-02-18
  • 打赏
  • 举报
回复
整个字符串就是就是:文件全路径1+NULL+文件全路径2+NULL+...+文件全路径N+NULL+NULL
WizardK 2008-02-18
  • 打赏
  • 举报
回复
pFrom
Address of a buffer to specify one or more source file names. These names must be fully qualified paths. Standard Microsoft MS-DOS wild cards, such as "*", are permitted in the file-name position. Although this member is declared as a null-terminated string, it is used as a buffer to hold multiple file names. Each file name must be terminated by a single NULL character. An additional NULL character must be appended to the end of the final name to indicate the end of pFrom.

还没明白?

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧