Page 1 of 1
How to use startwith?
Posted: Sat Feb 03, 2024 3:49 pm
by TheBestPessimist
I would like to search for the little poopies that macos creates, the files which start with "._".
I expected `startwith:"._"` to work, but it does not. I attached a screenshot of what i want to search for.
Re: How to use startwith?
Posted: Sat Feb 03, 2024 3:51 pm
by TheBestPessimist
I am sure such files exist and are indexed by Everything, because i can search for them by full name:
Re: How to use startwith?
Posted: Sat Feb 03, 2024 4:11 pm
by NotNull
Most likely cause:
Match Path is enabled (Menu => Search )
That will make Everything search the entire path (C:\.... ). Startwith:C:\ would list your ._ files (among thousands of others).
2 solutions:
- (temporarily) disable Match Path
- change your search to: nopath:startwith:._
EDIT:
Just remembered that there is a third option. It was discussed
here.
Basically: change the following setting to
match_start_of_filename_with_caret=2 and search for
^._
(untested)
Re: How to use startwith?
Posted: Sat Feb 03, 2024 4:21 pm
by froggie
try nopath:startwith:._ or uncheck match path in search.
@void: is this the way it is supposed to work?
Re: How to use startwith?
Posted: Sat Feb 03, 2024 4:27 pm
by NotNull
@froggie: see my Edit for a link to a discussion on this topic.
Re: How to use startwith?
Posted: Sat Feb 03, 2024 5:17 pm
by TheBestPessimist
@NotNull thanks, confirmed it works. _Now let's see what that option breaks in the future._
Re: How to use startwith?
Posted: Sat Feb 03, 2024 6:46 pm
by NotNull
The only thing I found so far with the caret to mark the start of the file is if I used startwith:^ to find files starting with a ^, one would use one of the following instead:
- startwith:^^
- startwith:"^"
- ^^
That last one is obviously the better one for a lazy person like me
Re: How to use startwith?
Posted: Sat Feb 03, 2024 6:56 pm
by froggie
@NotNull:
I don't understand what the discussion you pointed to has to do with startwith: -- ^ does not seem to work the same as startwith: and startwith: is unaffected by the match_start_of_filename_with_caret setting.
The question is why "startwith:._ " gives no hits at all when match path is checked (not too many, as you indicated in your reply)
Re: How to use startwith?
Posted: Sat Feb 03, 2024 7:16 pm
by NotNull
froggie wrote: ↑Sat Feb 03, 2024 6:56 pm
The question is why "startwith:._ " gives no hits at all when match path is checked (not too many, as you indicated in your reply)
From that thread:
void wrote: ↑Thu May 06, 2021 5:53 am
^ should match the start of the full path (when match Path is enabled)
Full path = filename including path, i.e. C:\folder\file.txt.
So startwith:notepad will find nothing as there is no full path that starts with notepad
froggie wrote: ↑Sat Feb 03, 2024 6:56 pm
^ does not seem to work the same as startwith:
Do you see different results when using
^abc
vs.
startwith:abc
? They should be the same.
(when
Match Path is unchecked and
match_start_of_filename_with_caret is set to either 1 or 2 )
Re: How to use startwith?
Posted: Sat Feb 03, 2024 7:56 pm
by froggie
Thanks. That makes it clearer.
So if ^ and startwith: are conceptually the same, shouldn't match_start_of_filename_with_caret affect both (or there should be an equivalent parameter for startwith:), since the same logic applies?
Re: How to use startwith?
Posted: Sat Feb 03, 2024 9:57 pm
by void
The recommend way for Everything 1.5+ is:
startwith:name:._
startwith:
name:
For Everything 1.4:
nopath:startwith:._
Search -> Match Path will force Everything to match the full path and name.
Please consider the following search:
\._
So if ^ and startwith: are conceptually the same, shouldn't match_start_of_filename_with_caret affect both (or there should be an equivalent parameter for startwith:), since the same logic applies?
^ and startwith: are the same internally.
Using match_start_of_filename_with_caret=2 applies nopath: ( ^ is the same as nopath:startwith: )
Re: How to use startwith?
Posted: Sat Feb 03, 2024 10:30 pm
by froggie
\._ Great. Simple and uncomplicated.
Re: How to use startwith?
Posted: Sun Feb 04, 2024 7:47 am
by TheBestPessimist
> The recommend way for Everything 1.5+ is:
>
> startwith:name:._
Thanks, that works just as well too!