How to search for filenames with wildcards AND trailing spaces?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
juzzle
Posts: 23
Joined: Sat Apr 11, 2020 1:07 am

How to search for filenames with wildcards AND trailing spaces?

Post by juzzle » Sat Mar 06, 2021 11:38 pm

I am a bit puzzled by this chanllenge.

Consider these files:

Code: Select all

House front 123.jpg
Houseboat 456.jpg
Housers 789.jpg
From the above I only want to find filenames starting with "House" followed by a space, ie:

Code: Select all

House front 123.jpg
I've tried "House *" (noting the space), but it doesn't seem to honour the space
I've tried the Whole Words option, but still finds all the above

I see mention of "Ignore Punctuation" in old threads, but I want include punctuation.

What am I doing wrong?

void
Site Admin
Posts: 6454
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void » Sat Mar 06, 2021 11:41 pm

Sounds like you have regex enabled.

Please try disabling regex from the Search menu and please try searching for:
"House *"


With regex enabled, "house *" means house following by any number of spaces.

Regex

juzzle
Posts: 23
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle » Sat Mar 06, 2021 11:44 pm

Thanks for the quick reply! But no, Regex is disabled.

I should also point out that I am using pipes to separate multiple criteria, eg

Code: Select all

House *|Farm *|Car *  
(noting again the space after the word)

void
Site Admin
Posts: 6454
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void » Sat Mar 06, 2021 11:48 pm

OR operations are done first, please try quoting or < > grouping, please try searching for:

"house *"|"farm *"|"car *"
-or-
<House *>|<Farm *>|<Car *>

Without grouping or quotes, Everything is seeing this query as: House AND (* OR Farm) AND (* OR Car) AND *

Alternatively, change your operator precedence to AND > OR:
  • In Everything, from the Tools menu, click Options.
  • Click the Search tab on the left.
  • Change Operator precedence to AND > OR.
  • Click OK.
  • Search for: House *|Farm *|Car *

juzzle
Posts: 23
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle » Sun Mar 07, 2021 12:27 am

Curiously, the "<" grouping method did not work, however, the double quotes method worked a treat!

Thank you so much

void
Site Admin
Posts: 6454
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void » Sun Mar 07, 2021 12:28 am

The < > grouping method will not match the space.

Use double quotes to match spaces.

juzzle
Posts: 23
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle » Sun Mar 07, 2021 12:36 am

Thanks again

raccoon
Posts: 147
Joined: Thu Oct 18, 2018 1:24 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by raccoon » Sun Mar 07, 2021 8:23 am

Maybe worth noting here, the OR priority can be changed in settings. I personally prefer the AND priority grouping as it seems more intuitive.

Tools > Options > General > Search > Operator precedence: "AND > OR"

Post Reply