Flat View Without Files

Hello,

I am trying to view the directory structure of a folder, but do not want any files displayed. Is there a way to do
flat view - grouped, but hide all files? I would like to create a button for it so I can place it on a toolbar.

I thought to set a filter, but I can't seem to get this to work and really don't know how to create and use such a filter.

Thanks!

I created a filter that shows folders only, how would I implement this into a button?

How about..

go c:\windows
select allfiles hidesel

Regards, AB

Here are two ways to do it, one using a command (which turns on flat-view and sets the hide-filename-filter to *), another using a style (which does the same thing in a different way):

Edit 2019: If you want a button that toggles Flat View and the filter at once:

FWIW - a single line button command like Set FLATVIEW=Toggle,Grouped HIDEFILTERFILENAME * will toggle both the flat view AND the file filter on and off at the same time... i.e. there's no need for 'another' button or three-button right click mode that runs any "clearfilters' stuff or turns the flat view 'off'. The one command will do it all...

Thanks for all the great suggestions! I'll play around with them to see which works the best...