将文件夹中的所有文件及其所有子文件夹移动到一个大文件夹中 - windows xp
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6258908/
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
move all files in a folder and all it's subfolders into one big folder - windows xp
提问by Zaphod Beeblebrox
I have a folder c:\downloads\ffme and inside it there are loads of subfolders with various amounts of files in each of them.
我有一个文件夹 c:\downloads\ffme ,里面有很多子文件夹,每个文件夹都有不同数量的文件。
I want to consolidate all those individual files into one big folder, removing them from their subfolders on the way. I want to end up with a folder with loads of files in it, but no subfolders. How can I do this?
我想将所有这些单独的文件合并到一个大文件夹中,途中将它们从子文件夹中删除。我想最终得到一个包含大量文件的文件夹,但没有子文件夹。我怎样才能做到这一点?
thanks
谢谢
回答by ic3b3rg
The easiest way would be w/o a cmd... just open the folder in Windows Explorer and search for *.*
, then select everything except the subfolders and drag/drop or cut/paste to the desired location.
最简单的方法是 w/oa cmd... 只需在 Windows 资源管理器中打开文件夹并搜索*.*
,然后选择除子文件夹之外的所有内容,然后拖/放或剪切/粘贴到所需位置。
回答by BugFinder
Use standard file recursion but rather than maintaining a directory structure, move the final file, unless of course the name already exists, then you would need to allow for renaming so that the file is maybe prepended with a directory name to maintain the unique filenames.
使用标准文件递归而不是维护目录结构,移动最终文件,当然除非名称已经存在,否则您需要允许重命名,以便文件可能预先带有目录名以维护唯一的文件名。
Have you done any form of recursive code?
你做过任何形式的递归代码吗?