How QuickSearch with multiple paths OR Specific file name contains

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
taufan
Posts: 32
Joined: 22 Mar 2020 02:33

How QuickSearch with multiple paths OR Specific file name contains

Post by taufan »

Hi,
For example, this is my folder directory:

Code: Select all

C:\Pic\January Fun\
  1.jpg
  2 #beach.jpg

C:\Pic\February Happy\
  3.jpg
  4 #beach.jpg

C:\Pic\March Happy\
  5.jpg
  6 #beach.jpg

C:\Pic\April Happy\
  7 #beach.jpg
  8 #beach #bali.jpg
  9 #beach #bali.jpg

C:\Pic\May Sad\
  10 #beach.jpg
  11 #beach bali.jpg

My goal:

I wanna QuickSearch "beach" ONLY in folder "January", "February", "March"
OR
search "beach" contain "bali" in ALL folder.


The result I expected:

Code: Select all

2 #beach.jpg
4 #beach.jpg
6 #beach.jpg
8 #beach #bali.jpg
9 #beach #bali.jpg
11 #beach bali.jpg

My current QuickSearch:

Code: Select all

(#beach /paths=*January*|*February*|*March*) OR (#beach AND bali)
But it doesn't produce any results. I know I'm wrong, but I can't solve this problem.

Any idea?
Thanks for your answer. I really appreciate it.

Jerry
Posts: 805
Joined: 05 May 2010 15:48
Location: The UnUnited States of America

Re: How QuickSearch with multiple paths OR Specific file name contains

Post by Jerry »

Hi,
First off, you need to disable extended pattern matching, apparently because of the presence of the # character. You can do that globally in settings or just for this search by appending
/matching=n to the end of the search expression.

Beyond that, I'm not sure exactly why, but it seems the parenthetic grouping with a qualifier switch is tripping things up. For example, if you just do the first part of the search without parentheses,
#beach /paths=*January*|*February*|*March* /matching=n
then you get

Code: Select all

2 #beach.jpg
4 #beach.jpg
6 #beach.jpg
And likewise, the second part of the search #beach AND bali /matching=n, gives you

Code: Select all

8 #beach #bali.jpg
9 #beach #bali.jpg
11 #beach #bali.jpg
But now the problem is how to get the union of these results with one expression. That's where I'm not sure what's going on. Even just doing the first part of the search with parentheses fails:
(#beach /paths=*January*|*February*|*March*) /matching=n

So my guess is that there is a bug or a limitation in the parsing of paranthetic groups containing a qualifier switch like /paths. For example, if you omit the /paths qualifier, then this combined expression
(#beach) OR (#beach AND bali) /matching=n
returns results, though of course, not the subset of results you want:

Code: Select all

2 #beach.jpg
4 #beach.jpg
6 #beach.jpg
7 #beach.jpg
8 #beach #bali.jpg
9 #beach #bali.jpg
10 #beach.jpg
11 #beach #bali.jpg
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.

Post Reply