Select files with similar names

Hello, I would like to configure a button, so that when selecting a file, it will select the other files that contain part of the name of the selected file.

Example: If I have the following files:

Yellow Submarine
Flowers of paris
Yellow
Christmas holidays
Forever submarine

And I select Yellow Submarine, which when I press the button selects me:

Yellow Submarine
Flowers of Paris
Yellow
Christmas holidays
Forever submarine

I know the path should be Select REGEXP..., but I can't get the regular expression right, I can't break the name into words.

Thank you so much!

At least currently, you'll probably need to use scripting for that, as you'd need to build up the regular expression that way. (Or run multiple select commands, one on each word, which scripting could do as well.)

I understood, I will study more about it, thank you very much!

Perhaps you can use the filtering for this? Press * to activate the filterbar and enter for example: (yellow|forever|submarine) so only the matching files will remain displayed and you can simply select all (and if you press escape all the other files will appear but these will remain selected).

Please note that any spaces around the pipe symbol | matter and will affect the results.

1 Like

For now I only have the idea, the knowledge does not

COPYNAMES=nopaths REGEXP (.*)\.[^.]* \1
([\w]+)\s([\w]+)\s([\w]+)\s([\w]+)(.*) \1 \2 \3 \4
Select REGEXP (\1|\2|\3|4)

As @bytespiller already suggested, you could use a Quickfilter as a workaround.

This script can fill the QF and could also be the base for your own Select script:

https://resource.dopus.com/t/set-quickfilter-from-clipboard/40606

1 Like