Only show movies files while browsing directories

I have a directory "photos" with a lot of subdirectories, some of which have movies in them. I want to browse all these directories, but while doing so only show the movie files. I managed to figure out that going to the Folder Options and then enter "*.(avi|flv|h264|m4v|mkv|mov|mp4|mpg|wmv)" in the Show filter works, but I want to be able to turn this filter on and of via a button/menu. Is there a way to do this?

This works...

<?xml version="1.0"?> <button backcol="none" display="both" hotkey="ctrl+alt+M" textcol="none"> <label>Movie Files</label> <tip>Displays ONLY movie files in the current lister</tip> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Set QUICKFILTER grp:movies</instruction> </function> </button> long as you have a group called "Movies".

If not, create one and add the extensions.

Settings > File Types > File Type Groups

Adding to what blueroly says, one thing that's not obvious is that the command will work as a toggle automatically. So you do not need a separate button to clear the filter.

You can also use wildcards directly:

Set QUICKFILTER *.(avi|flv|h264|m4v|mkv|mov|mp4|mpg|wmv)

If Opus sees grp:Movies it will expand it into a similar wildcard, based on the file type group, so they basically do the same thing, but one is more convenient to type by hand and also lets you define a list of extensions in one place which can then be used in lots of others. Which is best depends on how you plan to use it.

Thank you both for the quick reply! It works for the current folder, but when I browse to another folder, I have to re-apply it each time. Is there a way to make the filter persistent while browsing through the different folders, until I toggle it off again?

Turn off Preferences / File Displays / Filter Bar / Clear Quick filter automatically when changing folders.

Hi Leo, if I do that, I also can't see the directories I want to browse anymore :slight_smile:

As mentioned, the filter does continue to work on all folders if I do it by going to the Folder Options and then enter "*.(avi|flv|h264|m4v|mkv|mov|mp4|mpg|wmv)" in the Show filter (see screenshot):

Perhaps there is a way to enable this by a script command?

Please also note that the grp:movies shortcode doesn't work in the "Show Filter" field

To avoid filtering out the folders:


You can use buttons which set the Folder Options filter you're looking at as well or instead, if you prefer:


grp:Movies works in the Show Filter field for me at least.

Great Leo, both work indeed, thank you both very much!