How to Search for File Name and Folder Name at the Same Time

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
mikeshick
Posts: 13
Joined: 06 Jul 2020 10:28

How to Search for File Name and Folder Name at the Same Time

Post by mikeshick » 11 Jul 2020 08:50

How can i search for files of particular name within folders of a particular name?

Thanks.
Last edited by mikeshick on 15 Jul 2020 07:20, edited 1 time in total.

highend
Posts: 9101
Joined: 06 Feb 2011 00:33

Re: How to Search for File Name and Folder Name at the Same Time

Post by highend » 12 Jul 2020 18:38

By adding them |-separated to Location: and using a boolean OR-combined search in Name:?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

mikeshick
Posts: 13
Joined: 06 Jul 2020 10:28

Re: How to Search for File Name and Folder Name at the Same Time

Post by mikeshick » 15 Jul 2020 07:21

Sorry, I don't understand your answer. Could you explain further, if you don't mind/

highend
Posts: 9101
Joined: 06 Feb 2011 00:33

Re: How to Search for File Name and Folder Name at the Same Time

Post by highend » 15 Jul 2020 07:50

F1 - Main Topics - Info Panel - Find Files Tab

explains boolean and multiple location searches
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

RalphM
Posts: 1366
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to Search for File Name and Folder Name at the Same Time

Post by RalphM » 15 Jul 2020 10:07

AFAIK the OP's wish (find certain files within certain folders) cannot be done without scripting but as highend pointed out, you could do a boolean AND search for both names and then check the results.

If you are looking for a file named test2 in a folder named test1, you'd search for both names test1 AND test2 in location and it should bring up your result but it would also show a file test1 in a folder named test2.

I hope this made it somewhat clearer.
Ralph :-)
(OS: W10 1909 Home x64 - XY: Current beta - Office 2019 32-bit)

highend
Posts: 9101
Joined: 06 Feb 2011 00:33

Re: How to Search for File Name and Folder Name at the Same Time

Post by highend » 15 Jul 2020 10:38

A script isn't necessary. To get exact matches you could also use a (name:... AND path:...) OR (name:... AND path:...) ... combined pattern.

E.g.: :(abc.txt AND path:R:\\tst\\1) OR (name:def.txt AND path:R:\\tst\\2)
Which finds abc.txt only in the 1 subfolder and def.txt only in the 2 subfolder but NOT abc.txt in 2, even if it exists there.

But these solutions require a large amount of typing (which ofc could be avoided by coding a script that translates the search terms into this pattern type)
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Post Reply