Collapse folder tree option

Is there a way to collapse the folder tree with a button press?

after prolonged browsing it becomes expanded & unweildy.

@ the moment i have to open & close dopus or press the little minuses to turn them into plusses. :astonished:

any help would be appreciated. :slight_smile:


Set Tree=Toggle works if it is pressed twice.

Set Tree=Off
Set Tree=On

seems to work OK although the screen flashes a bit.

:opusicon: porcupine

Go ROOT=collapse

And John's solution works even better .
It's the correct answer.

You got me John ( laughter ).
I'm busy wire brushing rust off my Ford All Metal rear bumper .
I hope to have it painted by tonight.
Is that a valid excuse ?

:opusicon: porcupine

LOL Porc... well, we got John a few times lately so it was only a matter of time before he one-upped one of us again :slight_smile:. Expanding on what John mentioned I use the following functions bound to <Ctrl + Backspace>:

go /mycomputer
go root=collapse
go /mydocuments
go root=collapse

It does NOT collapse the My Network Places tree item, but you could probably add a go /network and additional go root=collapse to do - but I never really browse that so :slight_smile:.

thanks very much guys - that;s sorted the problem out! :slight_smile:

i couldn't get the my documents to work, but managed ok with :

go c:
go root=collapse
go d:
go root=collapse

that should be pretty good as i rarely use my docs anyway.

i bound that to cntrl+backspace as well so i'm beaming

thanks again! :slight_smile:

hey there ET... so it sounds like you're good to go, but you mentioned the '/mydocuments' method didn't work for you, I guess the '/mycomputer' didn't either? I'm just curious which part didn't work... the 'go' to the folder alias or the root=collapse? I would have thought that you could do what you're doing now with just the '/mycomputer' command and a single root=collapse...

edit note- technically, the documentation says that the 'go root' command is only effective when the current folder displayed is a 'filesystem folder' which some of the system folder aliases are not... maybe that could cause inconsistent behavior, but it's always worked for me... hmm.

Well, its a bit hit & miss, it does generally work, but it really depends on what you have open & what folder you are in when you hit the button. on testing it didn't seem to end up in my computer and often left c:\ and/or mydocuments expanded.

this is for the code:
go /mycomputer
go root=collapse
go /mydocuments
go root=collapse

if i use :
go /mycomputer
go root=collapse

on its own, it works ok

go /mydocuments
go root=collapse

on its own doesn't work so well.

hope that helps :slight_smile:

thanks again

I am looking for an answer to this question but I am new to Dir Opus. Could somebody explain this to me? I'm just looking for a keyboard shortcut to collapse the folder tree.
Thank you in advance,

You can add/edit hotkeys via Help > Keyboard Map (or Settings > Customize Toolbars > Keys, which goes to the same place).

From there, add a new Lister Hotkey, and make it run this, if you want it to go to This PC and then collapse everything in the tree:

Go /mycomputer

Or, if you want to stay in your current folder but collapse everything else, this on its own:


(Without doing any editing at all, you could also simply double-tap F8 to turn the tree off and immediately back on, which will have a similar effect to the last command.)

Many thanks for explanation!

Best regards,


1 Like

Hi Leo,
Thank you for this explanation but I'm afraid I don't quite understand how to add a new lister hotkey. Do you think you could direct me to the relevant section of the user manual so that I can do this myself?

Manual page: Customize / Keys.

As a quick summary of what to do:

  • Settings > Customize Toolbars > Keys.
  • Click the New Hotkey icon/button (top-left, above the main list), which opens a small menu of choices.
  • Choose New Lister Hotkey.
  • For a single-line command, paste it into the Function field.
  • For a multi-line command, click Advanced to expand the window, then paste the command into the big edit field that opens up.
  • Click OK in that dialog, then in the one it came from to save the change.

Note: Make sure you do not turn on the System-Wide Hotkey option, as you don't want that for this type of hotkey.