Expand/Collapse Folder button

Simple button that will toggle between expand and collapse currently selected folder(s).
Will be disabled if current selection is not a folder or folder expansion is off.

see How to use buttons and scripts from this forum - Buttons/Scripts - Directory Opus Resource Centre (dopus.com)

Expand_Collapse folder.dcf (391 Bytes)


Related: The new default toolbars have Expand/Collapse All Folders, which is similar but does all folders instead of the selected folders.


@Leo Could the function also be available in group mode in the official release? Now I can only use one of both, it's hard to make a choice :joy:

With this button, only the folder of the current path can be expanded/collapsed, the next level folder can't be expanded/collapsed, is it possible to specify the depth of the path when working?

You can't specify a depth (at least currently), but you could use this:


That will expand all currently visible folders. It won't recursively expand them in a single click, but it'll expand another level each time you run it. So you could put it on a button or hotkey and click it a few times to open multiple levels.

(Could also have a script that runs it until there's nothing left to expand. Just make sure it doesn't loop forever if there's an error preventing expansion, e.g. due to folder permissions.)

1 Like

Thinking about this some more, if you want to expand all levels, the old Flat View (Grouped) mode will give you that. (At least unless you then want to collapse some levels selectively afterwards.)