Show files in saved layouts with include & exclude filters

I would like to save a layout with a filter that will show all files with extension '.wzfolder', except one file, named 'WhizFolders Pro - Getting started Tutorial (6.1).wzfolder'.

I made a filter with Action: Select matching, and Hide items that don't match.
I have these 2 ticked:
Name, Match *.wzfolder (with 'use wildcards' ticked)
And Name No Match WhizFolders Pro - Getting started Tutorial
(6.1).wzfolder ('use wildcards' not checked)

I saved the filter and applied it. It worked. But when I save the layout, with the filter applied, the filter doesn't stick: when I use the button to return to the layout, all files show.

If I type '*.wzfolder' in a File Filter Field box, I can save the folder layout, and when I return to it, only the .wzfolder files show - including the one I want to exclude, of course.

I don't know how to exclude it by typing in the box. I've tried a lot of variants on:
*.wzfolders~(WhizFolders Pro - Getting started Tutorial (6.1).wzfolder)

  • putting the '~' inside the brackets, cutting down the name of the single file to eliminate the '(6.1)', etc. etc., but nothing works, after a couple of hours of experiment.

I also tried the same thing with a simple filter to exclude .bak files:

~.bak

But it displays all the .bak files, instead of excluding them.

I've looked in the Appendix and online, and nothing seems to match my problem: how to type an include and an exclude string; and then to get them to stick to a saved layout.

Thanks

Mary

The file filter and folder filters are separate, so all you need is to put *.wzfolder in the Hide files filter - it won't affect the folder at all.

Jon I read Mary's thread a little differently than you did, so I'll see if I can really confuse her. lol

Mary if you type:

*.wzfolder

in the show files box and then type:

WhizFolders Pro - Getting started Tutorial '(6.1').wzfolder

in the hide files box, you should see all .wzfolder files except for that tutorial one. Note how the ( and ) in the file name were escaped with '

If it were me, I would create a style to do this all with one simple click. you could set it up something like the screen grab below.


Actually we're both jumping to the conclusion that the one the OP wants to hide is a folder, but there's nothing to base that assumption on since they're all called *.wzfolder.

So actually I don't think there's a way to do this with the current filter system.

If they are all files, or all folders, then you can still do it. Set the appropriate hide filter to this:

(WhizFolders Pro - Getting Started Tutorial '(6.1').wzfolder|~(*.wzfolder))

That will hide WhizFolders Pro - Getting Started Tutorial (6.1).wzfolder as well as ~(*.wzfolder), which means everything that doesn't end with .wzfolder.

(Edit: Fixed the error John pointed out below. Ta!)

That seems to work too Leo, except if Mary copies and pastes your code it won't work because you have a typo in her exclusion file name.

I think "Pre" should be "Pro" so the code should actually be:

(WhizFolders Pro - Getting Started Tutorial '(6.1').wzfolder|~(*.wzfolder))

Thanks everybody. I hadn't been using the Show and Hide boxes, only the File filter field box. Putting "(WhizFolders Pro - Getting Started Tutorial '(6.1').wzfolder|~(*.wzfolder))" in the Hide filter box did indeed work.

Sorry for muddying the waters by using the extension '.wzfolder'. WhizFolders is a notebooks program, and its files use that extension.

I've had the same problem trying to show all .nb and .txt files while hiding one or 2 files with those extensions, so I'll use that for my followup question:

I'd like to be able to use just the File Filter Field box, and type an include and exclude on the same line. E.g.,

include (.nb|.txt)
exclude (lingua.nb|orb*.nb|wiki.txt)

I've tried

(.nb|.txt)~(lingua.nb|orb*.nb|wiki.txt)

  • no joy. Is there a way to combine them in one string?

Thanks a lot

Mary

I meant to add that I found everyone's replies very instructive, and I've copied most of the material to - where else? - my whizfolder notebook about Windows programs.

I've read the D Opus manual several times (well, maybe not right through each time...), with special attention to the appendix and other tech bits, but I often - as with this topic - don't find answers.

Is there another source - e.g. a PDF - for things like how to construct search/select/display strings, and other esoterica? Or do you experts have a background of a programming language that I should bone up on? (The only one I know is XyWrite/Nota Bene's XPL, which is no use outside those programs.)

Best wishes

Mary

I haven't been able to do all of this in the File Filter Field either, but that doesn't mean it can't be done (just that I'm not bright enough today).

However you can do it all in a manner similar to what I mentioned yesterday by using the show files and hide files boxes.

Or you can make a button to do it with these commands:

Set SHOWFILTERFILENAME *.(nb|txt) Set HIDEFILTERFILENAME (lingua.nb|orb*.nb|wiki.txt)

And you could configure that button to ask you for the file types to show or hide.
e.g.

Set SHOWFILTERFILENAME *.({dlgstring|Enter Show file types}) Set HIDEFILTERFILENAME (lingua.nb|orb*.nb|wiki.txt)

In regards to your other post, I dabble in some low level programming languages but other than command line scripting and a wee bit of VB I rarely use them with Opus. That's the beauty of Opus, it's so powerful you don't need many outside tools. You might want to bone up a bit on regular expressions if you're not familiar with them.

How to learn it? Well speaking for me only, I can say it takes time, a lot of time, and like other very powerful software (Photoshop comes to mind), you (and I) likely never will learn everything about it.

And find some way to record everything you do learn about it. You mentioned your whizfolder notebook program which I'm not familiar with but I just Googled it and see it looks rather similar to the TreePad database program I use for the same purpose.

John

Thanks for the info about buttons - only trouble with them is that my toolbars are already wall to wall with buttons.

I'm sure one should be able to do an include and an exclude together: it's such an obvious need. I guess I've got to get to grips with regular expressions.

Yes, it all takes time. As it happens, I do know quite a bit about Photoshop, but it's taken years. Also Nota Bene and its programming language, XPL - more years. And in both I've hardly done more than scratch the surface of their capabilities.

Yes, Whizfolders is similar to TreePad and suchlike. There are lots of them around; I chose this program because, like DOpus, it's highly user-configurable.

Mary

Have you ever thought about setting up auxiliary toolbars which only appear when you want them to? I have 3 such toolbars, one will appear as a vertical toolbar on the left side, one as a vertical toolbar on the right, and one as a vertical toolbar in between the folder tree and file pane. I can toggle all 3 toolbars (one at a time) via a single 3 button button.

Oh my...you shouldn't tempt me like that Mary. :wink:
I've been perfectly content using TreePad, which is also pretty configurable, but nothing like Opus is.