Folder color cheated by name-extension

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Folder color cheated by name-extension

Post by *bogordo »

Hi,
I have defined a yellow color for folders, works fine but if i hace a folder named "folder.txt" TC colorize this following the .txt color definition in white, is this normal? the thing is a folder, not a .txt file, but in this unique case the name of folder ends in .txt :)

https://i.ibb.co/DKph32B/CAPT-0001.png
https://i.ibb.co/P1D62DM/CAPT-0000.png
TC license #346559
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Folder color cheated by name-extension

Post by *Hacker »

bogordo,
Try moving the .txt definition lower. Or change the .txt definition to exclude folders.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder color cheated by name-extension

Post by *petermad »

Yoiu have to maka a search that explicitly finds folders only:

Code: Select all

[Searches]
Folders_SearchFor=
Folders_SearchIn=
Folders_SearchText=
Folders_SearchFlags=0|000002000020||||||||22221|0000|
An then assign the colorfilter to >Folders - like this:

Code: Select all

[Colors]
ColorFilter1=>Folders
ColorFilter1Color=40704
ColorFilter1ColorDark=45056,40704
See also: viewtopic.php?f=14&t=52472
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Folder color cheated by name-extension

Post by *bogordo »

Hi Peter,
I already have folder only search with this, not know the difference with your code:

Code: Select all

Folder_SearchFlags=0|002002000020||||||||22221|0000|||
TC license #346559
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder color cheated by name-extension

Post by *petermad »

It works fine here: https://madsenworld.dk/tcmd/coloredfoldernames.png

It works for ordinary drives and for Archives, FTP-sites, Network shares, Virtual folders, Search results etc.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Folder color cheated by name-extension

Post by *bogordo »

Thank you Peter,

The problem comes with another Search/color definition for .TXT files, that is priorized over the Folder one, do you have one for .TXT?

Moving down the .TXT filter works, but i thonk this is not the correct solution, since really the folder is a folder, even ending wth .txt...

Image: https://i.ibb.co/R38XCLF/CAPT-0005.png
TC license #346559
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder color cheated by name-extension

Post by *petermad »

If you don't want to move the >Folder item above the *.txt *.log then you can redefine so that it explicity rule out folders: https://madsenworld.dk/tcmd/txtnotfolder.png

Code: Select all

[Searches]
*.txt *.log_SearchFor=*.txt *.log
*.txt *.log_SearchIn=
*.txt *.log_SearchText=
*.txt *.log_SearchFlags=0|002002000020||||||||22220|0000|||

Code: Select all

[Colors]
ColorFilter3=>*.txt *.log
ColorFilter3Color=16711935
ColorFilter4=>Folder
ColorFilter4Color=33023
It works: https://madsenworld.dk/tcmd/txtnotfolder2.png - but is more cumbersom to maintain.

It is really much easier to move the >Folder item up in the list.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Folder color cheated by name-extension

Post by *bogordo »

Thank you Peter, yes, it's better to move up the folder definition.

It really wasn't a real problem, it was more like reporting the weird (isn't it?) behavior of taking a File definition being a Folder :)

Best regards,
TC license #346559
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Folder color cheated by name-extension

Post by *Hacker »

bogordo,
Well, a folder is a file that contains names of other files.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder color cheated by name-extension

Post by *petermad »

2bogordo
From Wikipedia:
Files (or links to files) can be located in directories. However, more generally, a directory can contain either a list of files or a list of links to files. Within this definition, it is of paramount importance that the term "file" includes directories.
https://en.wikipedia.org/wiki/Computer_file
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Folder color cheated by name-extension

Post by *bogordo »

:D Ok thank you both for clarifying, i thought "the nature" was different :oops:
TC license #346559
Post Reply