I have a main folder with about 80 folders in, each with about 10 items in. I want to be able to use a Terminal command or something to just move every item from each sub-folder into a new one (i.e the newly created folder would have around 800 items in, not separated by individual folders). Doing this by hand would be very tedious. Is there a way to do it easily and quickly? I have looked at ditto, but couldn't figure out how to use it for my use case. Any help would be much appreciated, thank you!


Assuming the structure is like


and all the items are uniquely named, you can use

cd main-folder
mkdir ../target-folder
mv */* ../target-folder/

to move everything into a target folder on the same directory level as the main folder. If you just want to move everything into the main folder, just use

cd main-folder
mv */* .
  • mv */* . worked perfectly, thank you! So easy :) – Tom Oakley Apr 15 '15 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .