Button for formatting tree

Hi all,
I would like a button that does the following for the tree view:

  1. Collapse all non selected branches, unless open in other tabs.
  2. Show the child folders of the current path (if they are not shown).

It seems to me that this button:[url]Folder Tree Question] should reset the tree to the settings in preferences (which might be what I want - being not even sure of that)? However, even if that should be the case, the results after clicking that button are not always the same (for the same folder, doing nothing else in between the two clicks)!

Would like a button that does 1) + 2) in a reliable manner. Thx.

preferably without dependencies on the preference-settings