问题
I have a folder c:\downloads\ffme and inside it there are loads of subfolders with various amounts of files in each of them.
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
回答1:
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.
回答2:
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?
来源:https://stackoverflow.com/questions/6258908/move-all-files-in-a-folder-and-all-its-subfolders-into-one-big-folder-windows