Colouring directories as well as files

English support forum

Moderators: white, Hacker, petermad, Stefan2

sbertolucci
Junior Member
Junior Member
Posts: 21
Joined: 2003-10-18, 23:35 UTC
Location: Milan

Colouring directories as well as files

Post by *sbertolucci »

Hi,

I don't know if it is already possible, but in case it isn't I would like to have the possibility to assign colors to folders.
I have one case in which there are several subfolders into a folder (on whose name I don't have control and the names are quite cryptic).
Each subfolder's content can have different meaning
Now, if I could assign a different color for each meaning it'd be easier for me to pick the correct ones depending on what I have to do. Now every time I have to proceed by trial and error because there is no connection between the folder name and its content type.

Thanks for the attention

Stefano
WC License # 44689
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Colouring directories as well as files

Post by *petermad »

Is it the background color of the folder panel you want to colorize, or is it the names of the folders? Both is already possible in TC

And could you give som examples - it is not very clear (to me, at least) what you mean?
Last edited by petermad on 2019-05-03, 17:27 UTC, edited 1 time in total.
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
User avatar
clifford_cooley
Junior Member
Junior Member
Posts: 40
Joined: 2019-03-05, 06:04 UTC
Location: USA

Re: Colouring directories as well as files

Post by *clifford_cooley »

As long as it is opt-in, it would be fine by me. All the colors in a programming text editor is distracting to me.
License #116347
sbertolucci
Junior Member
Junior Member
Posts: 21
Joined: 2003-10-18, 23:35 UTC
Location: Milan

Re: Colouring directories as well as files

Post by *sbertolucci »

petermad wrote: 2019-05-03, 11:50 UTC Is it the background color of the folder panel you want to colorize, or is it the names of the folders? Both is already possible in TC

And could you give som examples - it is not very clear (to me, at least) what you mean?
I'd rather change the font color, background is too heavy

As an example, if I have in a TC Panel
[..]
[Dir1]
[Dir2]
[Dir3]

I would like to be able to see them like
[..]
[Dir1]
[Dir2]
[Dir3]

Based maybe on some local settings made directly by me and just when needed.
Of course the logic used to color files (the extension) here can't be used for directories and automatic coloring based on content would be too complex and maybe slow
WC License # 44689
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Colouring directories as well as files

Post by *petermad »

2sbertolucci
As you can see here: http://madsenworld.dk/tcmd/dircolor.png - it is possible, but you have to make a rule for every dir you want coloured...

It can either be for all dirs with those names or just for dirs in a particular path.
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
sbertolucci
Junior Member
Junior Member
Posts: 21
Joined: 2003-10-18, 23:35 UTC
Location: Milan

Re: Colouring directories as well as files

Post by *sbertolucci »

Wow, thanks!!!!
Could you please give me an example of such a rule ?
I'm an old user of TC, but not so good in this kind of things.

Thanks

Stefano
WC License # 44689
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Colouring directories as well as files

Post by *petermad »

You can either make a rule for the specific directory name (for example Dir1) like this:
Put this in the [Searches] section of your windmd.ini file:

Code: Select all

Dir1_SearchFor=
Dir1_SearchIn=
Dir1_SearchText=
Dir1_SearchFlags=0|002002010021||||||||22221|0000|||
Dir1_plugin=tc.name = Dir1
And this in the [Colors] section:

Code: Select all

ColorFilter1=>Dir1
ColorFilter1Color=33023
This will make any directory with the name Dir1 orange in the file list
You will have to change 1 in Filter1 to another number, if you have other color filters of your own.
If it doesn't work with a higher number than 1, then go into "Configuration" -> "Options..." -> "Color" - enable "Define colors by file type" and click the button "Define colors by file type". Then move "Dir1" up in top of the list in the "Define colors by file type" dialog.

----------------

You can also do it so you mark any folder or file to be colored by using the File Comment function:
Put this in the [Searches] section of your windmd.ini file:

Code: Select all

Color orange_SearchFor=
Color orange_SearchIn=
Color orange_SearchText=
Color orange_SearchFlags=0|002002010021|||||||||0000|||
Color orange_plugin=tc.comment contains color=orange
And this in the [Colors] section:

Code: Select all

ColorFilter1=>Color orange
ColorFilter1Color=33023
Then on the directory Dir1 press Ctrl+Z and write: color=orange in the box and press F2.

This will make the directory with the name Dir1 orange in the file list - or any dir/file that you give the comment color=orange.
You will have to change 1 in Filter1 to another number, if you have other color filters of your own.
If it doesn't work with a higher number than 1, then go into "Configuration" -> "Options..." -> "Color" - enable "Define colors by file type" and click the button "Define colors by file type". Then move "Color orange" up in top of the list in the "Define colors by file type" dialog.

If you want to change the shade of the color go to "Configuration" -> "Options..." -> "Color" -> "Define colors by file type" -> "Edit" -> "OK" and pick another color in the color picker.

.
Last edited by petermad on 2019-05-06, 20:38 UTC, edited 1 time in total.
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
sbertolucci
Junior Member
Junior Member
Posts: 21
Joined: 2003-10-18, 23:35 UTC
Location: Milan

Re: Colouring directories as well as files

Post by *sbertolucci »

Thank you so much!!!!
Stefano
WC License # 44689
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Colouring directories as well as files

Post by *petermad »

CORRECTION!
In order for the approach using file comments to colorize the directory/file name to also work for files, the line:

Code: Select all

Color orange_SearchFlags=0|002002010021||||||||22221|0000|||
has to be changed to:

Code: Select all

Color orange_SearchFlags=0|002002010021|||||||||0000|||
I have edited the previous post accordingly.
Last edited by petermad on 2019-05-07, 11:58 UTC, edited 1 time in total.
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
sbertolucci
Junior Member
Junior Member
Posts: 21
Joined: 2003-10-18, 23:35 UTC
Location: Milan

Re: Colouring directories as well as files

Post by *sbertolucci »

Thanks!!!
WC License # 44689
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Colouring directories as well as files

Post by *bogordo »

Hi,
Nice approach this of relating the comment with color.
One doubt, is there an option to simply colorize the name of all the folders, so i know they are folders (since i dont use icons :) ), thus: "all folder names are yellow..."
Best regards,
TC license #346559
User avatar
kesdoputr
Member
Member
Posts: 168
Joined: 2007-12-27, 12:38 UTC

Re: Colouring directories as well as files

Post by *kesdoputr »

Folder only should be ok with

Code: Select all

Folder_SearchFor=
Folder_SearchIn=
Folder_SearchText=
Folder_SearchFlags=0|002002000020||||||||22221|0000|||
And color(example is blue)

Code: Select all

ColorFilter1=>Folder
ColorFilter1Color=16711680
ColorFilter1ColorDark=11117910,16711680
If you want to change, don't forget the color of noamal and dark mode should be define separately.
Last edited by kesdoputr on 2020-01-06, 10:32 UTC, edited 1 time in total.
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Colouring directories as well as files

Post by *bogordo »

kesdoputr wrote: 2020-01-05, 22:04 UTC Folder only should be ok with

Code: Select all

Folder_SearchFor=
Folder_SearchIn=
Folder_SearchText=
Folder_SearchFlags=0|002002000020||||||||22221|0000|||
And color(example is blue)

Code: Select all

ColorFilter1=>Folder
ColorFilter1Color=16711680
ColorFilter5ColorDark=11117910,16711680
If you want to change, don't forget the color of noamal and dark mode should be define separately.
Thank you very much, well i figured out the "ColorFilter5ColorDark" meant "ColorFilter1ColorDark" right? :)

So the "0|002002000020||||||||22221|0000|||" is what's identifying the folder stuff?
TC license #346559
User avatar
kesdoputr
Member
Member
Posts: 168
Joined: 2007-12-27, 12:38 UTC

Re: Colouring directories as well as files

Post by *kesdoputr »

Oh yes,sorry for the miss, it's ColorFilter1ColorDark.
You can load in search window and see what's it means, or you can change the setting yourselft :)

https://i.imgur.com/yzM1xBm.png
https://i.imgur.com/q4opbMv.png
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: Colouring directories as well as files

Post by *bogordo »

Thanks kesdoputr.

Just wondering, is possible to make this magic with folders that start with one underscore "_"? like "_photos"....or with folders inside brackets "(photos)" and so on?

Following the above example of folders starting with Dir 1: "Dir1_SearchFor=" would say that is "__SearchFor=", with two underscores?

Im going to use the Comments approach, but just for curiosity...
TC license #346559
Post Reply