Unable to find files and folders with an '!'

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Sander Bouwhuis
Posts: 249
Joined: 10 Jun 2008 15:40
Location: Netherlands

Unable to find files and folders with an '!'

Post by Sander Bouwhuis »

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: 15016
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

Sander Bouwhuis
Posts: 249
Joined: 10 Jun 2008 15:40
Location: Netherlands

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

Post by Sander Bouwhuis »

Yes, with <CTRL+F>. See screenshot.
XYplorer !.png
To see the attached files, you need to log into the forum.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.

highend
Posts: 15016
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: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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