Unable to find files and folders with an '!'

Things you’d like to miss in the future...
Post Reply
iycgtptyarvg
Posts: 222
Joined: 10 Jun 2008 15:40
Location: Netherlands

Unable to find files and folders with an '!'

Post by iycgtptyarvg »

Today I did a search for all files in a directory which had an '!' in the name. I use the fantastic 'filter as you type' feature. To my great surprise no files were returned. On inspection I saw there were 2 files of the format <name>!.<ext>
Doing a 'full search' also didn't show any files while there really are 2 files with an '!' in them.

Is this a bug or am I doing something stupid?
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Unable to find files and folders with an '!'

Post by highend »

! is interpreted as a NOT in the filter as you type as it seems. That should probably change

By "full search" you mean the interface that is invoked by Ctrl + f?

Show a screenshot of it...
One of my scripts helped you out? Please donate via Paypal

iycgtptyarvg
Posts: 222
Joined: 10 Jun 2008 15:40
Location: Netherlands

Re: Unable to find files and folders with an '!'

Post by iycgtptyarvg »

Yes, with <CTRL+F>. See screenshot.
XYplorer !.png
XYplorer !.png (17.22 KiB) Viewed 976 times
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Unable to find files and folders with an '!'

Post by highend »

You probably have
Configuration | Find and Filter | Find Files & Branch View | Find Files | Enable extended pattern matching
checked.

In that case (and if you want to keep it) you need to enclose the ! in []
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Unable to find files and folders with an '!'

Post by admin »

Wow, that was a surprise. I see a combination of a bug and some doubtful behavior. Here is the change log:

Code: Select all

    ! Quick Search: A leading "!" was still seen as Boolean operator if "Enable 
      extended pattern matching" was off. Fixed.
    * Find Files & Branch View | Find Files | Enable extended pattern matching: 
      Now a single "!" is not seen as unary Boolean NOT operator even if the 
      setting is on.
    * Live Filter Box: Now a single "!" is not seen as unary Boolean NOT 
So, in the next version typing a single ! into the live filter box ('filter as you type') will work as expected (show all items containing a !).

BUT: Contrary to Find Files and Quick Search, Visual Filters (and Live Filters, which are technically the same) are hard-coded to allow "extended pattern matching", so when you type "!a" (w/o quotes) you will get all items NOT containing an a. The only way to get all items containing "!a" is the pattern "[!]a". Not totally satisfying. :eh:

Questions:
a) Should Visual Filters / Live Filters also get an option to disable extended pattern matching???
b) (or) should Live Filters always internally disable extended pattern matching???

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Unable to find files and folders with an '!'

Post by admin »

Decided for this:
admin wrote:b) (or) should Live Filters always internally disable extended pattern matching???
Makes total sense since it makes Live Filters behave like Type Ahead Find in that respect (treat ! and # as characters).

Post Reply