Flattening folder structure

I imported some files and wound up with a nested folder structure several folders deep.

I can get to files by doing a search, but it’s rather clumsy. And opening each by diving through folders is a pain.

Is there some script or some command or some way to take all files from all the subsumed folders and put them all at the same level?

Select a group, Control-click and choose the contextual menu option, “Ungroup”. This will work on multiple selected groups.

I tried that, but it only seems to ungroup one level. If you have folders five deep, it only moves them up to four deep for instance. Unless I’m doing it incorrectly.

Yes. However, if you use the shortcut (command-option-U) rather than the menu or contextual menu item it makes quicker work of the task.

I made a Smart Group that pointed at a Group and gave it criteria of: Kind is not Group (though you could use: Kind is Any Document). This gave me a list of all the files in the Group which I could easily select and drag and drop to the top-level Group with ease.

Just my take on it.

  • cmd alt + ( that is menu bar > view > expand all) on the top level group
  • shift-click on the last of it’s subgroups with the top level group still selected

Now you’ll see all files in all selected groups and can move them anywhere you want.

(cmd alt - collapses all selected groups, see menubar > view)

@berndm: Just a note that this would only work in Three Pane View. I also would not be inclined to use this shortcut as it expands all Groups in the database. In a large database (ie. nested deeply) that could be problematic.
Option-clicking on the Group expands just itself and its subfolders a lá Finder.

Not a bad idea though. :smiley:

'could be problematic’ sounds so frightening to me. :wink:
Ok, the only unwanted effect I see is, that given one has expanded some groups by default, this expands/collapses all and he would have to expand his choice of groups later on again.

I use this all the time in such cases.