Define colors by type: Exclude network files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Define colors by type: Exclude network files

Post by *X-Byte »

I make extensive use of custom color definitions, some based on simple file name patterns, others on plugin rules.

I'm facing a problem with files/directories that are located on network shares in combination with plugin rules.

For example, I use the value Dirsizecal>Empty=Yes to color empty directories differently and unicodetest>Locked Test=Locked to color locked files. Works great with only little performance impact on local drives and gives me valuable additional information by just looking at the colors.

On network drives perfomance drops massively, so I'm looking for a way to exclude time consuming color filter plugin rules checks on network drives.

For this to work, I'd like to prepend the time consuming plugin rule with an AND-combined rule that checks if the file is located on a network ressource or local. Unfortunately I didn't find something appropriate in the tc plugin (maybe like tc>network>yes/no).
I hope Christian coded the rule logic in a way that if one rule in an AND combined ruleset already fails, the yet unverified rules are skipped.

Is there any known way to implement this in TC currently?

Another idea for color filtering in general just came into my mind:
So far we have different Custom Colums and Display Filters to choose from to suit the currently displayed file/workflow situation.

Why not also have the color definitions as complete sets (groups) to choose from?
E.g. I'm working with photos and want to see at a glance, just by the filename color, which photos were taken with a flash. Additionally I want to have different color shades for the age of the photos.
So I just select my "Color Definition Group" "Photos and Images"
That's just a simple example but there are probably dozens of other useful scenarios for different Color Definition Groups.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Just put the following as the first filter, and set its color to black (or whatever you use as the default color):
tc - path - contains - \\

or when using network drives, combine with OR:
tc - path - contains - \\
tc - path - contains - f:\
tc - path - contains - g:\

with f: and g: your network drives.
Author of Total Commander
https://www.ghisler.com
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

@ghisler(Author)
Nice workaround and works as expected :)

But what do you think about an additional property for the "tc" plugin, which states if a file/directory is a local object?

This way mapped drives would also be included and could also be used for other purposes.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately that would again mean additionnal per file function calls, e.g. to handle cases like "feed in listbox" or junctions to other drives.
Author of Total Commander
https://www.ghisler.com
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

I didn't expect that the function gets called even when no plugin rule is applied.
So it's probably better to have a custom content plugin which offers this functionality.
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

Post by *theosdikaios »

I use in such slow down filter defintion an addtional AND condition as first condition
tc -path - RegEx - ^[abcdefg]:
where abcdefg are my local drives
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
Post Reply