Behaviour of color by filetype filters

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Behaviour of color by filetype filters

Post by *solid »

I've created a color filter that changes the color of a folder if it contains specific files.

In plugins tab I have:
TC|Path|Contains|"F:\Projects\"
fileindir|DirFiles|contains|*.ext
"Combine with AND"

The filter is functioning correctly by coloring the folders in the specified path if they contain files with the given extension.
However, there is an issue where every time I enter any folder on any disk, TC checks if each subdirectory contains such files. This causes the panel to refresh and temporarily hang TC.

The expected behavior is that if the first condition is not met (Path doesn't contain "F:\Projects"), TC should not continue checking for the other conditions. Since the operator is AND, if the first condition is False, the result will always be False. Therefore, there is no point in continuing the check.

I'm unsure whether this is a bug, a design flaw, or if I am doing something incorrectly.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Behaviour of color by filetype filters

Post by *ghisler(Author) »

I cannot reproduce that. I have checked the code, and if there is an AND condition, TC stops loading plugin fields when the first condition is FALSE.

My rule looks like this:
[Colors]
ColorFilter1=>dir contains txt files
ColorFilter1Color=33023

And the saved search:
[searches]
dir contains txt files_SearchFor=
dir contains txt files_SearchIn=
dir contains txt files_SearchText=
dir contains txt files_SearchFlags=0|002002000020|||||||||0000|||
dir contains txt files_plugin=tc.path contains f:\\Projects\\ & fileindir.DirFiles contains .txt

Please note that *.txt doesn't work with "contains". Could you post your entries too, please?
Author of Total Commander
https://www.ghisler.com
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Behaviour of color by filetype filters

Post by *solid »

Hi 2ghisler(Author)

Thanks for reaching back.

Those are my entries:

[Colors]
ColorFilter2=>Color.srt
ColorFilter2Color=8421376

[searches]
Color.srt_SearchFor=
Color.srt_SearchIn=H:\Filmovi
Color.srt_SearchText=
Color.srt_SearchFlags=0|007002010021|||||||||0000|||
Color.srt_plugin=tc.path contains h:\\Filmovi\\ & fileindir.DirFiles contains .srt
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Behaviour of color by filetype filters

Post by *ghisler(Author) »

Maybe it's caused by a different color filter? I have now used this filter for a while and didn't notice any speed impact in any folders except for the specific folder. Btw, Color.srt_SearchIn=H:\Filmovi has no effect and is ignored.
Author of Total Commander
https://www.ghisler.com
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Behaviour of color by filetype filters

Post by *solid »

It started after I've set this filter. But it maybe interferes with some previous color filter. I'll have to investigate further.

Anyway it is hardly noticeable in most of the folders, just those containing a lot of subfolders.

Thanks for your replies.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Behaviour of color by filetype filters

Post by *ghisler(Author) »

Could you post your entire [Colors] and [searches] sections? You may rename folder names in there if you have privacy concerns.
Author of Total Commander
https://www.ghisler.com
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Behaviour of color by filetype filters

Post by *solid »

Sure. Sorry for late reply

wincmd.ini

Code: Select all

[Colors]
RedirectSection=%COMMANDER_PATH%\Ini\ColorSolarizedLight.ini

InverseCursor=0
InverseSelection=0
BackColor=14803683
BackColor2=13750737
ThemedCursor=1
ActiveTitle=14460022
InactiveTitle=15722978
ForeColor=-1
MarkColor=-1
CursorColor=-1
CursorText=-1

ColorFilter1=>Recently used files
ColorFilter1Color=11162880
ColorFilter2=>Recently used files - 3 days
ColorFilter2Color=7091712
ColorFilter3=>NetworkInPath
ColorFilter3Color=0
ColorFilter4=>Executable
ColorFilter4Color=2365583
ColorFilter5=>Video
ColorFilter5Color=8193451
ColorFilter6=>Directories
ColorFilter6Color=18504
ColorFilter7=>System
ColorFilter7Color=5455192
ColorFilter8=>Archives
ColorFilter8Color=18504
ColorFilter9=>Images
ColorFilter9Color=8913032
ColorFilter10=>Text
ColorFilter10Color=24064
ColorFilter11=>Temporary files
ColorFilter11Color=8289918

ColorSolarizedLight.ini

Code: Select all

[Colors]
InverseCursor=1
InverseSelection=0
BackColor=14939901
ForeColor=8616805
;ForeColor=9868419
MarkColor=3093212
CursorColor=3549952
1CursorText=-1
BackColor2=14018798
ThumbnailFrame=-2
ActiveTitle=3549952
ActiveTitleText=14939901
InactiveTitle=14939901
InactiveTitleText=8616805
ActiveTabColor=11432480
CompareNormalText=9868419
CompareNormalBack=3549952
CompareSelText=4339200
CompareSelBack=8616805
CompareDifferenceBack=-1
CompareText=3093212
CompareTextSel=3093212
CompareBinary=3093212
CompareBinarySel=3093212

ColorFilter1=>Recently used files
ColorFilter1Color=13798182
ColorFilter2=>Color.srt
ColorFilter2Color=8421376
ColorFilter3=>Recently used files - 3 days
ColorFilter3Color=11432480
ColorFilter4=>NetworkInPath
ColorFilter4Color=0
ColorFilter5=>Executable
ColorFilter5Color=6431910
ColorFilter6=>Video
ColorFilter6Color=8533715
ColorFilter7=>Directories
ColorFilter7Color=35253
ColorFilter8=>System
ColorFilter8Color=12874092
ColorFilter9=>Archives
ColorFilter9Color=10002730
ColorFilter10=>Images
ColorFilter10Color=35253
ColorFilter11=>Text
ColorFilter11Color=39301
ColorFilter1ColorDark=16436382,13798182
ColorFilter6ColorDark=14656503,8533715
ColorFilter7ColorDark=8583416,35253
ColorFilter10ColorDark=11913459,35253
ThemedCursor=1
CursorText=-1
ColorFilter8ColorDark=13549778,12874092
ColorFilter9ColorDark=8583416,10002730
ColorFilter11ColorDark=8976776,39301
ColorFilter12=>Temporary files
ColorFilter12Color=8289918
ColorFilter3ColorDark=16368524,11432480
ColorFilter5ColorDark=11709420,6431910
[Searches]

Code: Select all

[searches]
Directories_SearchFor=
Directories_SearchIn=
Directories_SearchText=
Directories_SearchFlags=0|00000200||||||||22221|0000
Temporary files_SearchFor=*.bak;*.wbk;~h*.*;$*.*;*.tmp;*.swp;backup*.*
Temporary files_SearchIn=
Temporary files_SearchText=
Temporary files_SearchFlags=0|00000200||||||||22220|0000
Images_SearchFor=*.ani;*.bmp;*.dib;*.cam;*.cdr;*.cur;*.clp;*.dcm;*.acr;*.dcx;*.djvu;*.iw44;*.emf;*.eps;*.fpx;*.g3;*.gif;*.heic;*.icl;*.ico;*.iff;*.lbm;*img;*.jpg;*.jpeg;*.kdc;*.ldf;*.lwf;*.pbm;*.pcd;*.pcx;*.pgm;*.png;*.ppm;*.psd;*.psp;*.ras;*.sun;*.rle;*.sff;*.sfw;*.sgi;*.rgb;*.swf;*.tga;*.tif;*.tiff;*.webp;*.wbmp;*.wmf;*.xbm;*.xpm
Images_SearchIn=
Images_SearchText=
Images_SearchFlags=0|002002000020||||||||22220|0000|||
Video_SearchFor=*.avi;*.mpg;*.mpeg;*.mov;*.m2v;*.mp4;*.flv;*.wmv;*.mkv;*.m2ts;*.webm;*.mts;*.mxf
Video_SearchIn=
Video_SearchText=
Video_SearchFlags=0|002002000020||||||||22220|0000|||
Sound_SearchFor=*.aac;*.aif;*.au;*.snd;*.mid;*.rmi;*.med;*.mp3;*.ra;*.wav
Sound_SearchIn=
Sound_SearchText=
Sound_SearchFlags=0|002002000020||||||||22220|0000|||
Archives_SearchFor=*.arj;*.ace;*.rar;*.cab;*.zip;*.lzh;*.ace;*.tar;*.uue;*.GZip;*uc2
Archives_SearchIn=
Archives_SearchText=
Archives_SearchFlags=0|00000200||||||||22220|0000
Executable_SearchFor=*.bat;*.com;*.cmd;*.exe;*.msi;*.scr;*.lnk;*.pif
Executable_SearchIn=
Executable_SearchText=
Executable_SearchFlags=0|00000200||||||||22220|0000
System_SearchFor=*.dll;*.sys;*.cpl;*.vxd;*.bin
System_SearchIn=
System_SearchText=
System_SearchFlags=0|00000200||||||||22220|0000
Text_SearchFor=*.doc;*.docx;*.rtf;*.htm;*.html;*.txt;*.diz;*.nfo;*.bbs;*.ini;*.log;*.srt;*.sub;*.m3u;*.ahk
Text_SearchIn=
Text_SearchText=
Text_SearchFlags=0|002002000020||||||||22220|0000|||
Recently used files_SearchFor=
Recently used files_SearchIn=
Recently used files_SearchText=
Recently used files_SearchFlags=0|00000200|||1|1|||||0000
Recently used files - 3 days_SearchFor=
Recently used files - 3 days_SearchIn=
Recently used files - 3 days_SearchText=
Recently used files - 3 days_SearchFlags=0|00000200|||3|1|||||0000
NOtDirectories_plugin="tc.size.bytes = 0"
Temp_SearchFor=
Temp_SearchIn=
Temp_SearchText=
Temp_SearchFlags=0|002002000020||||||||22220|0000|||
NetworkInPath_SearchFor=
NetworkInPath_SearchIn=
NetworkInPath_SearchText=
NetworkInPath_SearchFlags=0|000002000020|||||||||0000|
NetworkInPath_plugin="tc.path contains \\\\"
Temp_plugin=tc.path contains \\Downloads\\
RescuedDate_SearchFor=*.pdf
RescuedDate_SearchIn=
RescuedDate_SearchText=
RescuedDate_SearchFlags=0|002002000020|29.07.2017|29.07.2017|||||||0000|||
Office docs_SearchFor=*.doc;*.docx;*.xls;*.xlsx;*.ppt;*.pptx;*.csv
Office docs_SearchIn=
Office docs_SearchText=
Office docs_SearchFlags=0|003002010021|||||||||0000|||
Test_church_SearchFor=
Test_church_SearchIn=K:\Seed
Test_church_SearchText=
Test_church_SearchFlags=0|007002010021|||||||||0000|||
Test_church_plugin=fileindir.DirSubdirs contains algebra
Color.srt_SearchFor=
Color.srt_SearchIn=h:\Filmovi\
Color.srt_SearchText=
Color.srt_SearchFlags=0|007002010021|||||||||0000|||
Color.srt_plugin=tc.path contains h:\\Filmovi\\ & fileindir.DirFiles contains .srt
InSubfolder_SearchFor=
InSubfolder_SearchIn=
InSubfolder_SearchText=
InSubfolder_SearchFlags=0|007002010021||||||||22221|0000|2||
Hmmm, I've just found that I have another [Searches] section near the end of wincmd.ini. Maybe that causes the problem?

Based on the search names it should be inactive. I don't remember when I was using those, most probably is taken from some online posted settings.

Here it is:

Code: Select all

[Searches]
©Executable_SearchFor=*.com;*.cpl;*.exe;*.lnk;*.msi;*.msu;*.pif;*.scr
©Executable_SearchIn=
©Executable_SearchText=
©Executable_SearchFlags=0|000002000020||||||||22220|0000
©Script_SearchFor=*.bat;*.cmd;*.js;*.msc;*.vbs;*.up;*.wsf
©Script_SearchIn=
©Script_SearchText=
©Script_SearchFlags=0|000002000020||||||||22220|0000
©Archive_SearchFor=*.7z;*.a0?;*.ace;*.arj;*.bz2;*.bzip2;*.cab;*.cpio;*.edc;*.gz;*.gzip;*.ha;*.ice;*.iso;*.jar;*.lfd;*.lha;*.lof;*.lst;*.lzh;*.lzma;*.pk3;*.r0?;*.rar;*.tar;*.taz;*.tbz;*.tbz2;*.tgz;*.tpz;*.uc2;*.uha;*.uue;*.xar;*.z;*.zip;*.zoo;*.zz
©Archive_SearchIn=
©Archive_SearchText=
©Archive_SearchFlags=0|000002000020||||||||22220|0000
©Document_SearchFor=*.chm;*.csv;*.djv;*.djvu;*.doc;*.docx;*.docm;*.hlp;*.odf;*.odg;*.odp;*.ods;*.odt;*.pdf;*.ppt;*.pptm;*.pptx;*.pps;*.ppsm;*.ppsx;*.pub;*.rtf;*.txt;*.wps;*.wri;*.xls;*.xlsb;*.xlsm;*.xlsx;*.xps
©Document_SearchIn=
©Document_SearchText=
©Document_SearchFlags=0|000002000020||||||||22220|0000
©SourceCode_SearchFor=*.asm;*.asp;*.aspx;*.bas;*.bsh;*.c;*.cc;*.cpp;*.cs;*.cxx;*.f;*.for;*.fs;*.fsi;*.fsscript;*.h;*.hh;*.hpp;*.hxx;*.idl;*.inc;*.inl;*.java;*.js;*.jsp;*.lisp;*.lsp;*.lua;*.m;*.nsi;*.p;*.pl;*.pm;*.py;*.pas;*.php;*.pp;*.pro;*.rc;*.resx;*.sh;*.sql;*.tli;*.tlh;*.vb;*.wsdl;*.wsf;*.xaml;*.xoml;*.xsd;*.dtd
©SourceCode_SearchIn=
©SourceCode_SearchText=
©SourceCode_SearchFlags=0|000002000020||||||||22220|0000
©InternetFile_SearchFor=*.css;*.htm;*.html;*.jhtml;*.mht;*.phtm;*.phtml;*.sht;*.shtm;*.shtml;*.url;*.xhtml;*.xml;*.xsl;*.xslt
©InternetFile_SearchIn=
©InternetFile_SearchText=
©InternetFile_SearchFlags=0|000002000020||||||||22220|0000
©Picture_SearchFor=*.ai;*.ani;*.bmp;*.clp;*.cgm;*.cur;*.dib;*.drw;*.dxf;*.emf;*.eps;*.gif;*.ico;*.icl;*.iff;*img;*.jpe;*.jpeg;*.jpg;*.lbm;*.ldf;*.lwf;*.pbm;*.pcd;*.pct;*.pcx;*.pgm;*.pic;*.png;*.ppm;*.ps;*.qtif;*.ras;*.rgb;*.rle;*.sfw;*.svg;*.tga;*.tif;*.tiff;*.wmf;*.wpg
©Picture_SearchIn=
©Picture_SearchText=
©Picture_SearchFlags=0|000002000020||||||||22220|0000
©PictureSource_SearchFor=*.cdr;*.pdn;*.psd;*.psp;
©PictureSource_SearchIn=
©PictureSource_SearchFlags=0|000002000020||||||||22220|0000
©PictureSource_SearchText=
©Audio_SearchFor=*.aif;*.aiff;*.au;*.cda;*.med;*.mid;*.midi;*.mod;*.mpa;*.mp3;*.ogg;*.ra;*.ram;*.rmi;*.rmx;*.rv;*.s3m;*.sfx;*.sid;*.snd;*.spc;*.voc;*.vvs;*.wav;*.wma;*.xm
©Audio_SearchIn=
©Audio_SearchText=
©Audio_SearchFlags=0|000002000020||||||||22220|0000
©Video_SearchFor=*.3gp;*.asf;*.avi;*.divx;*.flv;*.mkv;*.mp4*;*.mpe;*.mpeg;*.mpg;*.mpg4;*.mov;*.mts;*.qt;*.rm;*.swf;*.vob;*.wmv;*.xvid
©Video_SearchIn=
©Video_SearchText=
©Video_SearchFlags=0|000002000020||||||||22220|0000
©Temporary_SearchFor=~*.*;*.~~~;$*.*;*.$??;*.bak;*.log;*.old;*.org;*.pk;*.swp;*.tmp;*.temp;*.wbk
©Temporary_SearchIn=
©Temporary_SearchText=
©Temporary_SearchFlags=0|000002000020|||||||||0000
©Folder_SearchFor=
©Folder_SearchIn=
©Folder_SearchText=
©Folder_SearchFlags=0|000002000020||||||||22221|0000
©SystemFile_SearchFor=*.386;*.bin;*.cpl;*.dat;*.dll;*.drv;*.ocx;*.swp;*.sys;*.vxd
©SystemFile_SearchIn=
©SystemFile_SearchText=
©SystemFile_SearchFlags=0|000002000020||||||||22220|0000
©ServiceFile_SearchFor=*.ax;*.bbs;*.cat;*.cfg;*.config;*.dir;*.diz;*.inf;*.ini;*.ion;*.log;*.manifest;*.me;*.nfo;*.nls;*.reg;*.rus;*.scp;*.settings;*.!!!
©ServiceFile_SearchIn=
©ServiceFile_SearchText=
©ServiceFile_SearchFlags=0|000002000020||||||||22220|0000
©CompressedFolder_SearchFor=
©CompressedFolder_SearchIn=
©CompressedFolder_SearchText=
©CompressedFolder_SearchFlags=0|000001000020||||||||22221|0000|
©Other_SearchFor=*
©Other_SearchIn=
©Other_SearchText=
©Other_SearchFlags=0|000002000020||||||||22220|0000
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behaviour of color by filetype filters

Post by *petermad »

2solid
However, there is an issue where every time I enter any folder on any disk, TC checks if each subdirectory contains such files. This causes the panel to refresh and temporarily hang TC.
How do you know that it is this color filter tha1 is the cause of this?

There is an orphan entry in your [Searches] section:
NOtDirectories_plugin="tc.size.bytes = 0"

try and remove that. An remove the second [Searches] section, though TC will use the first one.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Behaviour of color by filetype filters

Post by *ghisler(Author) »

Thanks for posting these sections. Unfortunately I can't find any color filter which would cause a slowdown.
Author of Total Commander
https://www.ghisler.com
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Behaviour of color by filetype filters

Post by *solid »

petermad wrote: 2024-01-24, 19:51 UTC 2solid
However, there is an issue where every time I enter any folder on any disk, TC checks if each subdirectory contains such files. This causes the panel to refresh and temporarily hang TC.
How do you know that it is this color filter tha1 is the cause of this?
It started when I defined this filter and stops after disabling it.
petermad wrote: 2024-01-24, 19:51 UTC There is an orphan entry in your [Searches] section:
NOtDirectories_plugin="tc.size.bytes = 0"

try and remove that. An remove the second [Searches] section, though TC will use the first one.
Thanks for noticing.


2ghisler(Author)

Maybe I've found the reason. I have enabled "Calculate occupied spaces by directories" and set to "Automatic with Everything". If I set this to manual only, folder in the panel still refreshes, but seems like the refreshes lasts shorter and doesn't hang.

Maybe because the plugin checks each dir causes the folders to be recalculated and refreshed, while it finishes the checks?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Behaviour of color by filetype filters

Post by *ghisler(Author) »

I'm also using "Automatic with Everything" and there is no delay, except when using DebugIconThread (which causes a big slowdown). But I don't think you are using that.
Author of Total Commander
https://www.ghisler.com
Post Reply