Search and match multiple files at once

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
teomi
Posts: 3
Joined: 16 Mar 2026 06:48

Search and match multiple files at once

Post by teomi »

Hi there,
I am interested in the tool and wanted to see if it supports a certain workflow.

I have a unique file management situation where I need to match a list of files to other files that share the same filename other than the last string of the filename.
For instance, say I have the following file list:
this_file_1
that_file_1
other_file_1

And then I have other files that share the same naming but end with _2..._3...._4.
I want to find all files that share the same filename string except the end string and see them all together as a new file list in one explorer window so I can select them all at once.

Hopefully I explained it clear enough :)

Is it possible with XYPlorer?

Thanks,
Eitan

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

Re: Search and match multiple files at once

Post by highend »

Hopefully I explained it clear enough
Not for me, sorry...

You only want to match those files that have either a trailing _1, _2, etc.?
All files that are missing that trailing part should not be listed?
Are all files from the same directory and / or recursive subdirectories?

Code: Select all

a_1.txt
b_1.png
c.txt
d.png
e_2.html
f_2.xml
->

Code: Select all

a_1.txt
b_1.png
e_2.html
f_2.xml
?
One of my scripts helped you out? Please donate via Paypal

teomi
Posts: 3
Joined: 16 Mar 2026 06:48

Re: Search and match multiple files at once

Post by teomi »

Let me try to be clearer.
Let's say I have 5 folders with hundreds of files in each one.
The names of the files match between all folders except the last string of the filename.
In the first folder, I found 10 files that I want to match their counter parts in the other 4 folders. Their filenames match teh ones in folder one but the last string of teh file name is different.

I would want to match the files I selected in folder 1 with all matching filenames (minus the last filename string) in all other folders and then display all files found in a new window so I can select all of them

Thanks,
Eitan

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

Re: Search and match multiple files at once

Post by highend »

E.g. let's say you are currently in C:\Temp.
Where are now the 4 other folders that XY should use for the comparison to find the other files?
Are they always in the same place?

Give a small real world example...
One of my scripts helped you out? Please donate via Paypal

teomi
Posts: 3
Joined: 16 Mar 2026 06:48

Re: Search and match multiple files at once

Post by teomi »

Let's see if this is clearer.

Folder 1
File1_tight
File2_tight

Folder 2
File1_loose
File2_loose

Folder 3
File1_open
File2_open


I want to use all the files in folder 1 as a search query and exclude "_tight" from the search so the results will show the following in one explorer window so I can select them all:

File1_tight
File2_tight
File1_loose
File2_loose
File1_open
File2_open

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

Re: Search and match multiple files at once

Post by highend »

E.g. let's say you are currently in C:\Temp.
Where are now the 4 other folders that XY should use for the comparison to find the other files?
Are they always in the same place?
One of my scripts helped you out? Please donate via Paypal

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

Re: Search and match multiple files at once

Post by jupe »

If I understand the task properly, maybe something like below would be one way to achieve it, you'd just run it when you are in Folder1. (or any of the folders for that matter)

Code: Select all

goto "<curpath>\..\?:" . regexreplace(listpane(, "_", 5, " | "), "_[^_]+?(?= \||$)") . " /f";

Post Reply