Lost in booleans

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
flacky
Posts: 7
Joined: Tue Apr 06, 2021 8:23 am

Lost in booleans

Post by flacky »

HI!

I'm using Everything in python scripts and but I'm stuck in a weird search operation:

Indexed files:
\folder_A\name_1
\folder_B\name_2
\folder_C\name_3
\folder_C\name_1
\folder_A\name_2

Return all file names that exist in "folder_A" and also "folder_C".
(The only matching file name is name_1.)

"folder_A" returns name_1 and name_2
"folder_C" returns name_1 and name_3
"folder_A | folder_C" returns name_1, name_2 and name_3
All three just as expected.
"folder_A folder_C" returns nothing, because there's no single item that has both words.

Only solution I currently have is:
1. Search for folder_A
2. Search for folder_C
3. Compare the resulting lists and filter names that exist in both lists

Any better ideas?

Thanks' for reading, flacky
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Lost in booleans

Post by therube »

Check:
Tools | Options | General -> Search ---> Operator precedence:
& see if changing that helps?

(To me, it should be AND > OR. That's where I keep mine.)

(Actually, that's not going to matter in this case, I don't think.)

---
If you're wanting to see all the files in both folders, your
folder_A | folder_C
should be what you want.

Note potential differences:
folder_A | folder_C
vs
"folder_A | folder_C"
vs
"folder_A" | "folder_C"
.

---

If you're wanting to see common files between the two directories, that's something different again.

Once you've found all the files in each directory that you're wanting, right-click the Name column header, Find Name Duplicates.

(Note you can right-click various columns (or add columns) to search for various dups.)
flacky
Posts: 7
Joined: Tue Apr 06, 2021 8:23 am

Re: Lost in booleans

Post by flacky »

Thanks for your comprehensive answer therube, I do appreciate it.
Tools | Options | General -> Search ---> Operator precedence:
I immediately looked into this, but a change didn't work. I am actually looking for and AND operation, but I currently don't see how any combination of AND and OR could help.
"folder_A | folder_C"
I see that quotes make a difference, but how could a quoted vertical bar (OR sign) help. ORed folder names return far to many items.
Find Name Duplicates.
I'm indeed hoping for a solution using dupe: But afaik dupe: filters file names, not folder names.
dupe: returns name_1 and name_2 because they exist twice in the list.
!dupe: just returns name_3.
But I'm looking for name_1 which is the only name assigned to folder_A and also folder_C.
Also I'm not using the GUI but everything.dll with v1.4.1.1005 with a python class based on this code.

Any more ideas how I can avoid separate searches followed by a filter routine? The sample above is indeed simplified. There might be quite a number of folder names to search for on a much larger index.

Thanks again, flacky


BTW. All this isn't needed any more the day version 1.5 supports XMP side car files with user defined tags!
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: Lost in booleans

Post by void »

Sounds like Regex is enabled under the Search menu.

Does disabling regex under the Search menu help?
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: Lost in booleans

Post by void »

Please try escaping spaces with double quotes.

For example:


"C:\Program Files\" | "C:\Program Files (x86)\"
flacky
Posts: 7
Joined: Tue Apr 06, 2021 8:23 am

Re: Lost in booleans

Post by flacky »

Thanks for your attention, Void.

Regex is turned off. I also played with escaping spaces without any luck at all.

Yesterday I wrote a python wrapper that splits the search phrase and then searches for every given word separately. Well, it does the job but supporting operators and modifiers makes it tricky and of course quite slow.

Let me repeat the situation again.
Given are the indexed files:
\folder_A\name_1
\folder_B\name_2
\folder_C\name_3
\folder_C\name_1
\folder_A\name_2

Request: Return all file names that exist in "folder_A" and also "folder_C". (The only matching file name is name_1.)

Thanks for reading, flacky
Post Reply