exclude files with Live Filter

Features wanted...
Post Reply
7iben
Posts: 93
Joined: 04 Apr 2019 18:22

exclude files with Live Filter

Post by 7iben »

I would like to be able to exclude files using the Live Filter function. Is this already possible?
example:
001.pdf
001_test.pdf
002.pdf
002_test.pdf
003.pdf
003_test.pdf
004.pdf
004_test.pdf
Here I would like to hide all files with test in the file name. So that only the remaining files are displayed one below the other.
This would enable faster file selection.

highend
Posts: 14243
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: exclude files with Live Filter

Post by highend »

Sure it is, read the help about visual filter syntax for the NOT operator...
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 3242
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: exclude files with Live Filter

Post by jupe »

Before you reply it doesn't work, make sure this is enabled

Configuration | Find and Filter | Filters & Type Ahead Find | Live Filter Box | Enable extended pattern matching

7iben
Posts: 93
Joined: 04 Apr 2019 18:22

Re: exclude files with Live Filter

Post by 7iben »

I found the following command:
!*test*
This also works well. It's just a bit time-consuming and fiddly to enter the command and put the word between the stars.
Is it possible to filter and exclude multiple words? I haven't managed that yet. So the above command two or three times with different words?
And is it possible to call up the last applied filters via the filter symbol.
At the moment this only works for me with the last filter as long as I don't close Xyplorer.

highend
Posts: 14243
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: exclude files with Live Filter

Post by highend »

I haven't managed that yet. So the above command two or three times with different words?
The examples include such a case^^

And if it's too much work to type everything in, write a script that creates the necessary pattern for such cases...
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 93
Joined: 04 Apr 2019 18:22

Re: exclude files with Live Filter

Post by 7iben »

a script would be ideal. So you only have to enter the words that you want to filter. Unfortunately I can't write scripts. Can someone help me?

highend
Posts: 14243
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: exclude files with Live Filter

Post by highend »

Code: Select all

    $words   = input("Enter ','-separated words", , "hello,world", "e");
    $pattern = "!(";
    foreach($word, $words, ",", "e") { $pattern .= "*" . trim($word) . "*" . ";"; }
    copytext trim($pattern, ";") . ")";
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 93
Joined: 04 Apr 2019 18:22

Re: exclude files with Live Filter

Post by 7iben »

Thank you. Is there also a possibility for the script to enter and confirm directly in the filter field. At the moment the filter is not applied but is just copied to the clipboard.

highend
Posts: 14243
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: exclude files with Live Filter

Post by highend »

Replace the last line with
filter trim($pattern, ";") . ")", 1+4+8;
?
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 93
Joined: 04 Apr 2019 18:22

Re: exclude files with Live Filter

Post by 7iben »

perfekt, thank you very much :tup: :tup: :tup:

Post Reply