If I use the following search I get hits only on D:
*_DSC*.jpg c:|*_DSC*.jpg d:
And
*_DSC*.jpg d: | *_DSC*.jpg c:
gives only hits on C:
Why am I not getting hits on both drives please/
Terry
OR syntax seems to fail
Re: OR syntax seems to fail
*_DSC*.jpg c:|*_DSC*.jpg d:
is the same as:
*_DSC*.jpg <c:|*_DSC*.jpg> d:
Note: < and > for grouping
*_DSC*.jpg d: | *_DSC*.jpg c:
is the same as:
*_DSC*.jpg <d: | *_DSC*.jpg> c:
Please try changing your OR precedence:
*_DSC*.jpg c:|*_DSC*.jpg d:
is the same as:
<*_DSC*.jpg c:> | <*_DSC*.jpg d:>
*_DSC*.jpg d: | *_DSC*.jpg c:
is the same as:
<*_DSC*.jpg d:> | <*_DSC*.jpg c:>
is the same as:
*_DSC*.jpg <c:|*_DSC*.jpg> d:
Note: < and > for grouping
*_DSC*.jpg d: | *_DSC*.jpg c:
is the same as:
*_DSC*.jpg <d: | *_DSC*.jpg> c:
Please try changing your OR precedence:
- In Everything, from the Tools menu, click Options.
- Click the Search tab on the left.
- Change Operator precedence to: AND > OR
- Click OK.
*_DSC*.jpg c:|*_DSC*.jpg d:
is the same as:
<*_DSC*.jpg c:> | <*_DSC*.jpg d:>
*_DSC*.jpg d: | *_DSC*.jpg c:
is the same as:
<*_DSC*.jpg d:> | <*_DSC*.jpg c:>
Re: OR syntax seems to fail
Thanks. Presumably that's because of the space in each of my search strings? If so why not group both of them? This
<*_DSC*.jpg c:> |<*_DSC*.jpg d:>
seems to work OK and is more intuitive IMO.
Terry
<*_DSC*.jpg c:> |<*_DSC*.jpg d:>
seems to work OK and is more intuitive IMO.
Terry
Re: OR syntax seems to fail
The spaces around a | are ignored.
I've just noticed you have two *_DSC*.jpg
It would be easier to do:
*_DSC*.jpg c: | d:
which is the same as (when using OR > AND precedence):
*_DSC*.jpg <c: | d:>
I've just noticed you have two *_DSC*.jpg
It would be easier to do:
*_DSC*.jpg c: | d:
which is the same as (when using OR > AND precedence):
*_DSC*.jpg <c: | d:>
Last edited by void on Thu Dec 24, 2020 9:52 pm, edited 1 time in total.
Reason: Added (when using OR > AND precedence)
Reason: Added (when using OR > AND precedence)
Re: OR syntax seems to fail
Thanks. At first
*_DSC*.jpg c: | d:
didn't seem to work, with results only in D:
But then I discovered Everything had reverted to the' AND > OR' setting. Changing that back to 'OR > AND' worked correctly.
However it seems that the safest syntax is
<*_DSC*.jpg c:> | <*_DSC*.jpg d:>
as I don't want to have to first check (or change) the precedence settings. Of course, that assumes I do remember to group any string that contains a space, as is always the case when I'm just searching on more than one drive.
*_DSC*.jpg c: | d:
didn't seem to work, with results only in D:
But then I discovered Everything had reverted to the' AND > OR' setting. Changing that back to 'OR > AND' worked correctly.
However it seems that the safest syntax is
<*_DSC*.jpg c:> | <*_DSC*.jpg d:>
as I don't want to have to first check (or change) the precedence settings. Of course, that assumes I do remember to group any string that contains a space, as is always the case when I'm just searching on more than one drive.
Last edited by terrypin on Thu Dec 24, 2020 2:56 pm, edited 1 time in total.
Re: OR syntax seems to fail
What is your current Operator precedence? (see above)
It should be OR > AND (the default) for this to work.
It should be OR > AND (the default) for this to work.
Re: OR syntax seems to fail
I suspect our posts crossed while I was editing mine. That is now my default.
Re: OR syntax seems to fail
This suggested syntax by void should work regardless too:terrypin wrote: ↑Thu Dec 24, 2020 2:34 pm However it seems that the safest syntax is
<*_DSC*.jpg c:> | <*_DSC*.jpg d:>
as I don't want to have to first check (or change) the precedence settings. Of course, that assumes I do remember to group any string that contains a space, as is always the case when I'm just searching on more than one drive.
Code: Select all
*_DSC*.jpg <c: | d:>
Re: OR syntax seems to fail
Yes, thanks, works fine, and saves a pair of group brackets too.