Page 1 of 1

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

Posted: 11 Jul 2020 08:50
by mikeshick
How can i search for files of particular name within folders of a particular name?

Thanks.

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

Posted: 12 Jul 2020 18:38
by highend
By adding them |-separated to Location: and using a boolean OR-combined search in Name:?

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

Posted: 15 Jul 2020 07:21
by mikeshick
Sorry, I don't understand your answer. Could you explain further, if you don't mind/

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

Posted: 15 Jul 2020 07:50
by highend
F1 - Main Topics - Info Panel - Find Files Tab

explains boolean and multiple location searches

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

Posted: 15 Jul 2020 10:07
by RalphM
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.

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

Posted: 15 Jul 2020 10:38
by highend
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)