Color Filter for folder w/o children by absolute path

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Color Filter for folder w/o children by absolute path

Post by Filehero »

Hi,

I guess it's too late and I'm simply missing the obvious ...

Goal: color filtering a dedicated folder only, without staining its children

With definitions

Code: Select all

dir: c:\path\to\folder
dir: c:\path\to\folder\
all children folders get colored as well.

How can I avoid this?

Thanks,
Filehero

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Color Filter for folder w/o children by absolute path

Post by bdeshi »

Well, that was quite puzzling. I guess not many people color-filter individual items. or this should've been raised more often.

I think this is the root cause for your -- grief.
::help 'idh_colorfilters.htm#idh_cfname'; wrote:Loose matches: Name and Dir patterns support Loose Match, i.e. wildcards (*) are internally auto-added left and right of a pattern if no wildcards (* or ?) are contained in the pattern. So "cat" will match "wildcat.txt".
That means your filters were actually interpreted as:

Code: Select all

dir: *c:\path\to\folder*
dir: *c:\path\to\folder\*
You can use one of these:

Code: Select all

dir: *c:\path\to\folder // works, but might match on named drives
dir: c:\path\to\folder AND len: == 17 // much better. 17 being strlen("c:\path\to\folder")
@Don, there ought to be the option to match exactly without automatic wildcards.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Color Filter for folder w/o children by absolute path

Post by Filehero »

Hi Sammay,

:D :appl: :D

SammaySarkar wrote:Well, that was quite puzzling. I guess not many people color-filter individual items. or this should've been raised more often.
Actually I want to highlight individual folders that have a accompanying SVN working copy. I went for color filters just automatically. Haven't thought about any alternative (better) way (like tags) yet.
SammaySarkar wrote: I think this is the root cause for your -- grief.
::help 'idh_colorfilters.htm#idh_cfname'; wrote:Loose matches: Name and Dir patterns support Loose Match, i.e. wildcards (*) are internally auto-added left and right of a pattern if no wildcards (* or ?) are contained in the pattern. So "cat" will match "wildcat.txt".
That means your filters were actually interpreted as:

Code: Select all

dir: *c:\path\to\folder*
dir: *c:\path\to\folder\*
Yes, this was my suspicion as well, I had hoped for the terminal backslash like it is used for directories in Custom File Icons, though.

SammaySarkar wrote:You can use one of these:

Code: Select all

dir: c:\path\to\folder AND len: == 17 // much better. 17 being strlen("c:\path\to\folder")
Works! Ha!!
SammaySarkar wrote:@Don, there ought to be the option to match exactly without automatic wildcards.
Yes, please! This is just a native option of a filter/pattern system like that.


Thanks again Sammay!

Post Reply