Why is not not not when at the start of a path?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Why is not not not when at the start of a path?

Post by therube »

Why is not not not when at the start of a path?


Everything (1351)

searching for "!abc123"


you can search, !!abc123
& that is fine
(not negates not, leaving not, which is what you want.)

but, /!!abc123
does not work (iow, to find !abc123 at the beginning of a path-part)?
yet, /!abc123 does (work)?
(as does /"!abc123", but that is expected)

why can you not not when not beginning a path-part,
but you cannot not not when you are,
& yet path-part/not does work?
?


it's kind of like / OR \ is eating not (!)?
(i think i just tied myself into a knot.)


(In case it matters, I almost always have PATH enabled.)
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Why is not not not when at the start of a path?

Post by NotNull »

1. ! is a valid character in filenames
2. ! is an operator, but to make it easier to explain (for me :D), see it as a search modifier not:


With that:
- a ! enclosed in "" is a literal ("textual") !, no longer a search operator
- /!!abc123 will also be seen as a literal ! (and will find c:\!!abc123 as it is not at the start.

therube wrote: Tue Jun 27, 2023 2:53 pm yet, /!abc123 does (work)?
(as does /"!abc123", but that is expected)
Those should find filenames "!abc123". The ! is literal here too.


P.S. The title should be: Why is not not not when NOT at the start of a path
Or not? Please nod if not not.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why is not not not when at the start of a path?

Post by void »

The ! must appear first.

Please try:

!/abc123
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Why is not not not when at the start of a path?

Post by therube »

But in this case, ! is part of the file name, "!abc123".

And I was looking for "!abc123" at the start of a path, /.

So !/abc123 would not (or is it ! ;-)) return "!abc123" as a (wanted) result.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why is not not not when at the start of a path?

Post by void »

What about:

!/!abc123

which Everything will see as:

NOT /!abc123
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Why is not not not when at the start of a path?

Post by therube »

Well, !!/!abc123 does work (returning the wanted !abc123).

Though that it, or other methods do return expected results, I'm more questioning as to why /!!abc123 does not - when it is at the beginning of a path separator?
(Where you would expect !! to NOT the !, leaving only [a literal] !.)
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why is not not not when at the start of a path?

Post by void »

Same reason abc!123 is not treated as: abc NOT 123

The ! in abc!123 is treated as literal character if it is preceded with a literal character.

! is only treated as NOT when it is the first character.

Everything treats / and \ as a literal character.
Post Reply