Color Filters - Difference between C:\* and C:\folder\*

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Color Filters - Difference between C:\* and C:\folder\*

Post by Marco »

If I have a color filter for

Code: Select all

C:\*
everything within C is colored, including C itself in the Drive list.
If I have a color filter for

Code: Select all

C:\folder\*
everything within C:\folder is colored, except for C:\folder itself. Am I missing something in the difference between drives and folders or it is an actual inconsistency?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Color Filters - Difference between C:\* and C:\folder\*

Post by bdeshi »

This colors all children of folder as per the use manual (see last line example in quote)

Code: Select all

C:\folder\*
This colors the folder itself

Code: Select all

C:\folder\
or

Code: Select all

C:\folder
I can only say coloring Drives deviates from the normal behavior. Bear with my explanation.

From the manual (::rtfm "idh_colorfilters.htm#idh_cfname"):
Advanced filename patterns
You can as well color certain List items in specific directories by stating a pattern that will be matched against the full path of each item.
Rules:
If the pattern contains the character "\" then
it's treated against the full path
(relative/portable syntax supported)
Else
it's treated against the file name
(without path)
Examples:
... ...
C:\Windows\* -> matches all items that are located in C:\Windows\
According to this, "C:\folder\*" matches all items that are LOCATED inside C:\folder\ , but not the folder itself , which happens in your case and which is the expected behavior. Use "C:\folder\"

When it comes to Drives, "C:\*" would "match" all items that are LOCATED in C:\ , but not the folder (here, drive C ) itself.
And "C:*" would not color the drive either because there's no "\" and the filter is not "treated against the full path" (but of course, there can be no file with C: in its name, and C: itself is a drive/dir, not a file).
As a result it would be impossible to color drives with existing coloring rules. So rules such as "C:\*" color drives as well as its contents, even though it's not the normal behavior.

But remember, it's only my opinion and almost certainly not guaranteed to be hard fact.

edited: beautify, add link, misc repair work.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Color Filters - Difference between C:\* and C:\folder\*

Post by Marco »

Hi and thank you for the explanation!
So you'd mean that drives are treated this way by design?
I also notice that a filter like "C:\*" colors the drive itself in the List but not in Tree - I guess this is a bug.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Color Filters - Difference between C:\* and C:\folder\*

Post by bdeshi »

(Just discovered the tree and list coloring inconsistency. It sure looks like a bug!)

Drive and normal folder coloring really seems slightly different, whether by design or by mistake -- I'll leave for the Don to decide... But it IS inconsistent.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Color Filters - Difference between C:\* and C:\folder\*

Post by admin »

Agreed. I changed it so that the drive is not colored anymore in drives listing.

Post Reply