Does Directory Opus have a Treesize view

Does anyone know if Directory Opus has the capability of showing the size of each folder in a higherarchical tree that you can havigate in the same was as Treesize Pro?

Not in the actual tree panel, but you could put a lister into Flat, Grouped mode, hide all files, and calculate folder sizes.

How would one do this via a single, programmed button?

Have a look at this thread: ... t=flatview

Adding a GetSizes command to the button may work, but I'm not sure. You may have to have more than one button, but you could do it using a Three-Button that you quickly left click and then right click. Try it as a single button first, it might work.

That worked, sort of (as VicCam in your referenced post indicated). I input it as follows:

Set FLATVIEW=on,Grouped

It initiates the first Set command on one click (I see a change in the status bar to reflect the number of hidden files), but takes a second click to initiate the second Set command and GetSizes. Once done, it toggles between showing and hiding files.

I tried using the following line instead:

Set FLATVIEW=Toggle,Grouped

but it only shows and hides the number of hidden files in the status bar.

Is there an issue with using two Set commands in the same command, or a particular syntax required?

In addition, is there a way to turn off GetSizes in code?

I just thought of a much better way to do this which works with a single button:

Go to Preferences - Layout - Lister Styles and create a new style called "Flat Dir Sizes" or whatever you want.

(If you have the Styles toolbar displayed you can right-click it and do "Add Style" to do the above step quicker.)

In the style, set it to use Flat View and then turn on the Format checkbox and edit the format.

In the format, Filters tab, turn on the Hide Filter for Filename = *, and then in the Columns tab add a column such as Total File count which will force the folder sizes to be calculated.

(In theory you shouldn't need that column and could, instead, change the Get folder sizes setting in the Options tab of the format. In reality, Styles seem to ignore this flag. I'll file a bug report on that, but adding the column instead seems to do the trick.)

You may want to define another style which does the reverse of this so you can get back to normal easly.

Now you can either use the Styles toolbar to jump into this mode or you can make a button which loads the style by name:

Prefs STYLE="Flat Dir Sizes"

If automatic size calculation is turned off in Preferences and Folder Options, and none of the columns which show sub-item counts are displayed, then GetSizes will only happen each time you run the GetSizes command. There's nothing to turn off as such.

Oh, going back to the original idea, don't forget what John Zeman says in the (currently) last post in the thread I linked. You can combine the two Set commands into one line, which may work better.

Definitely the easier route. Thanks!

I had tried that, but same result.

how would that look?

i added a Flat-dir-sizes lister style following your descriptions.
but when i click on one of the other lister styles from the menu, to get back to normal, all single files still remain hidden!

to reverse it i tried creating an Un-Flat lister style, as you suggested, but no luck there either.
i tried by adding an * in the 'show filter'

so now
how do i get to see my files again?
for now i am blind! cannot work without seeing files...

(hmm...i guess the lesson is ....rookies shouldn't mess around in the DOpus innerworkings, either that Or they should maybe try to read a manual)

its so weird.

all of a sudden it works.

i tried it dozen of times to no avail but suddenly Unflat does work.
i can now also go back and forth between flat and un-flat.
and i get to see my files again

i'm puzzled but glad i can continue working.

So it was probably user error but could it be a DOpus bug? since you mentioned that sometimes flags are ignored

It's hard to say what it was but one thing that helps when editing Styles and Folder Formats is to always close the lister and open a new one after making some changes. Then you can see the effect things will have in a clean context, where no settings are cached.

See the folder formats FAQ (linked in my sig) for info about the way formats can be cached for a particular lister. It can be quite confusing if you don't know about it.

Edit 2019: If you want a button that toggles Flat View and filters out all files (keeping folders) at once: