Filter Out Selected Extensions vs Manual Visual Filter

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Filter Out Selected Extensions vs Manual Visual Filter

Post by Enternal »

I had this issue for a while now and I believed it was my problem. However, it keep on happening and now it's driving me insane :shock:

Fresh install
Make around 100 files with a mixture of avi, mkv, and mp4 files.

Code: Select all

VIDEO-01.mkv
VIDEO-02.mp4
VIDEO-03.mp4
VIDEO-04.mp4
VIDEO-05.mkv
VIDEO-06.avi
VIDEO-07.mp4
VIDEO-08.mp4
VIDEO-09.mp4
VIDEO-10.mkv
VIDEO-11.avi
VIDEO-12.mkv
VIDEO-13.avi
VIDEO-14.mkv
VIDEO-15.mkv
VIDEO-16.mkv
VIDEO-17.mp4
VIDEO-18.avi
VIDEO-19.avi
VIDEO-20.mkv
VIDEO-21.mkv
VIDEO-22.mkv
VIDEO-23.mkv
VIDEO-24.mkv
VIDEO-25.mkv
VIDEO-26.mkv
VIDEO-27.mkv
VIDEO-28.avi
VIDEO-29.mkv
VIDEO-30.mkv
VIDEO-31.avi
VIDEO-32.mkv
VIDEO-33.mkv
VIDEO-34.mkv
VIDEO-35.mkv
VIDEO-36.avi
VIDEO-37.mkv
VIDEO-38.avi
VIDEO-39.mkv
VIDEO-40.avi
VIDEO-41.avi
VIDEO-42.avi
VIDEO-43.avi
VIDEO-44.avi
VIDEO-45.avi
VIDEO-46.mp4
VIDEO-47.avi
VIDEO-48.avi
VIDEO-49.mp4
VIDEO-50.mp4
VIDEO-51.mp4
VIDEO-52.mp4
VIDEO-53.avi
VIDEO-54.mkv
VIDEO-55.avi
VIDEO-56.avi
VIDEO-57.avi
VIDEO-58.mkv
VIDEO-59.mkv
VIDEO-60.avi
VIDEO-61.avi
VIDEO-62.avi
VIDEO-63.mkv
VIDEO-64.mp4
VIDEO-65.avi
VIDEO-66.mkv
VIDEO-67.avi
VIDEO-68.mkv
VIDEO-69.avi
VIDEO-70.avi
VIDEO-71.mkv
VIDEO-72.mp4
VIDEO-73.mp4
VIDEO-74.mp4
VIDEO-75.mp4
VIDEO-76.mp4
VIDEO-77.avi
VIDEO-78.avi
VIDEO-79.mkv
VIDEO-80.mp4
VIDEO-81.mp4
VIDEO-82.mp4
VIDEO-83.mkv
VIDEO-84.mkv
VIDEO-85.mp4
VIDEO-86.mp4
VIDEO-87.mp4
VIDEO-88.mp4
VIDEO-89.mp4
VIDEO-90.mkv
VIDEO-91.mp4
VIDEO-92.mp4
VIDEO-93.mkv
VIDEO-94.mp4
VIDEO-95.avi
VIDEO-96.avi
VIDEO-97.mp4
VIDEO-98.mp4
VIDEO-99.mp4
Now manually type in the visual filter using Ctrl + J. Type in filter:

Code: Select all

!*.mkv;!*.mp4;!*.avi
There are still files that are shown that belong to any of the inclusion filters. Not working as expected. Now disable visual filters and manually select one file of each kind. Basically select an mkv file, avi file, and mp4 file. Now Filter Out Selected Extensions or keyboard shortcut Ctrl+Shift+Alt+J. BOOM! Just as expected. And the visual filter status info gave out the similar command that was used when you manually entered it. Weird isn't it?
2014-12-14 01_37_45-Desktop_TEST - XYplorer 14.60.0200 - [FRESH].png
Interestingly, in my case, the parameter that is generated from the Filter Out Selected Extensions is:

Code: Select all

!*.avi;*.mp4;*.mkv
If I manually entered that same parameter instead of my original

Code: Select all

!*.mkv;!*.mp4;!*.avi
then it works as expected. Seems like the ordering is important but should it be?
To see the attached files, you need to log into the forum.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by bdeshi »

::help 'idh_visualfilters.htm'; wrote:!a*;b* -> hide all items starting with "a" or "b". (NOT operator refers to whole expression)
Reading this, I think !*.mkv;!*.mp4;!*.avi is actually parsed as !(*.mkv;!*.mp4;!*.avi) = (NOT *mkv = no mkv) + (NOT !*.mp4 = *.mp4 = all mp4) + (NOT !*avi = *.avi = all avi)
so only the first extension if is filtered and rest are displayed. And it holds in reality: !*.mkv;!*.mp4;!*.avi hides all mkv files and displays mp4 and avi.

So you should use !*.mkv;*.mp4;*.avi.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by admin »

The first "!" is applied to the whole expression. Therefore

Code: Select all

!*.mkv;!*.mp4;!*.avi
is parsed as

Code: Select all

NOT (*.mkv OR NOT *.mp4 OR NOT *.avi)
What you want is NOT (*.mkv OR *.mp4 OR *.avi) which is coded as

Code: Select all

!*.mkv;*.mp4;*.avi
Quoting Help:
NOT: A leading ! (exclamation mark) will invert the filter, i.e. show only items *not* matching any of the patterns. If you want to show items starting with "!" you have to escape it with "\":

Examples:

a*;b* -> show all items starting with "a" or "b".

!a*;b* -> hide all items starting with "a" or "b".

\!a*;b* -> show all items starting with "!a" or "b".

The operator can also be used for individual operands in a Boolean expression. Note that this works only for non-first operands, since the NOT operator in front of the first operand is interpreted as NOT operator for the whole expression:

!a*;b* -> hide all items starting with "a" or "b". (NOT operator refers to whole expression)

a*;!b* -> show all items starting with "a" or not starting with "b". (NOT operator refers only to 2nd operand)

water and !ageM: w -> "water" in the name and not modified this week

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by Enternal »

Ah thanks! That explains it. The way I was thinking is if I want to invert everything, I would do something like

Code: Select all

!(*.mkv;*.avi;*.mp4)
but in this case, the 1st ! already does that already.

The funny thing is that I really do need new glasses or something. When I used the example code that was generated by XYplorer itself:

Code: Select all

!*.avi;*.mp4;*.mkv
what I saw was in my own head was:

Code: Select all

!*.avi;!*.mp4;!*.mkv
which after you guys knocking sense into me that I realized what it really was (!*.avi;*.mp4;*.mkv) and not what I thought it was. Seems like being inactive from this forum for too long cause me all sort of stupidity. Maybe I need to get back in a bit more often. XD

admin
Site Admin
Posts: 67279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by admin »

Or: meditate, look into fire and inhale the smoke, listen to bob marley and dance. Whatever, don't stop too early. Then sleep 12 hours. Your eyes will be better.

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by Enternal »

:lol: inhale smoke? I found out that the smokes from burnt rubber seems to be working in an interesting way. :whistle:

admin
Site Admin
Posts: 67279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Filter Out Selected Extensions vs Manual Visual Filter

Post by admin »

Yep, the lungs are a powerful interface.

Post Reply