windows 如何自动复制包含内容的子文件夹
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24385239/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to robocopy subfolders with content
提问by Daniel
It is hard to believe but I seem to be not able to copy a folder with all its files (that begin with a certain character) and subfolders (beginning with the same character) to another folder in Windows 7. I used copy, xcopy and robocopy but all I do achive is, that all files in the top level directory and all the subdirectories but without their content get copied. What am I doing wrong? I tried several ways, my last try was:
很难相信,但我似乎无法将一个文件夹及其所有文件(以某个字符开头)和子文件夹(以相同字符开头)复制到 Windows 7 中的另一个文件夹中。我使用了 copy、xcopy 和robocopy 但我所做的只是,顶级目录和所有子目录中的所有文件都被复制,但没有它们的内容。我究竟做错了什么?我尝试了几种方法,最后一次尝试是:
robocopy path\path\here x* path\path\there /E
I also tried
我也试过
/COPYALL
/MIR
but with the same result.
但结果相同。
回答by idarryl
Your robocopy syntax is incorrect. Is should be:
您的 robocopy 语法不正确。应该是:
robocopy path\path\here path\path\there x* /E
回答by Rahul Agrawal
ROBOCOPY path\path\here path\path\there \*.* /
E
ROBOCOPY path\path\here path\path\there \*.* /
乙