Define colors by file type question

English support forum

Moderators: Hacker, petermad, Stefan2, white

jOOc
Junior Member
Junior Member
Posts: 3
Joined: 2007-10-04, 16:18 UTC

Define colors by file type question

Post by *jOOc »

Hello,

I have files like this:

File1.avi
File1.srt
File2.avi
File3.avi
File3.srt
File4.avi

I know how to get the *.avi files in another color and also how to hide *.srt, but I want to color the avi files in eg green, but only if the same file exists with extension .srt

Can this be done? I would have been nice.

Thx for a great application
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Can't. In coloring definition you can't reference any other files. But it could be done with a custom .wdx plugin, shouldn't be hard with script.wdx
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Hi,

I have extended my content plug-in "Misc". The new field "Sibling" allows to color all files which have a "sibling filename" with a certain extension.

To make it work you have to create a file called Misc.ini with the following content in the same directory where wincmd.ini is placed (locate wincmd.ini: Menu Help/About Total Commander).

Code: Select all

[Sibling]
Extension=srt
You can of course also change this to another extension if desired. All files with the same name but another extension will be colored if an appropriate definition has been made in "define colors by filetype". You have to click on the define button and then navigate to the plug-in tab. The rule to add is "misc.Sibling=Yes". Then save the configuration.

http://www.lefteous.de/tc/archives/misc/wdx_misc_1.04.zip
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Can you add support for Misc.ini in Misc home directory?

Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 16083
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Can you add support for Misc.ini in Misc home directory
Yes, please.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I have added support for a more tolerant ini file location handling:
http://www.lefteous.de/tc/archives/misc/wdx_misc_1.05.zip
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Thanks! :)

Icfu
This account is for sale
jOOc
Junior Member
Junior Member
Posts: 3
Joined: 2007-10-04, 16:18 UTC

Post by *jOOc »

Thank you.. can you explain a little more where to put the misc.ini file. I dont get it to work

/Jocke
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Put it in the same directory as Misc.wdx OR in the directory where wincmd.ini is located, as written above...

Icfu
This account is for sale
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

It should work in all of the following cases:
- Same directory as wincmd.ini
- Directory "Misc" below directory where wincmd.ini is located
- Total Commander base directory
- Plugin directory
jOOc
Junior Member
Junior Member
Posts: 3
Joined: 2007-10-04, 16:18 UTC

Post by *jOOc »

I got it to work now... Thank you
User avatar
Sombra
Power Member
Power Member
Posts: 814
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

2Lefteous

One suggestion (or two) for misc.wdx: Could you improve the plugin for accept more extensions?

Currently is necessary to copy the plugin misc to a directory with different name for work with more extensions.
For me it is useful for search files which don't have the checksum calculated (md5, sfv), too for tooltip, for show if a backup o subtitle exist. Subtitle=[=misc.sibling] Backup=[=misc2.sibling]

An option could be the key "Extension" separated by Semicolons. Example: Extension=srt;sfv;md5;bak;tmp;torrent;bla bla.

A second option or alternative: Add more fields in misc.lng to the key sibling. Example:
sibling1=sibling (bak)
sibling2=sibling (md5)
sibling3=bla bla

What do you think? Could be viable?
I can read English, but... I write like Tarzan. (sorry)
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Sombra
Could you improve the plugin for accept more extensions?
Sounds like a good idea.
User avatar
Sombra
Power Member
Power Member
Posts: 814
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

:) 8)
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Hello

I have problems to use (or understand the tool).

I have the misc.ini in the plugin-dir, content is:

Code: Select all

[Sibling]
Extension=lsp
In userdefined-columns I have [=misc.Sibling], anf the following files show thes results:

Code: Select all

0-PL.fas        No     
0-PL.LSP       No  

1                 No
1.txt            Yes 
2.lsp            No
2.txt            No
I thought that 2.lsp has a sibling "2.txt" and 0-pl.lsp and 0-pl.fas are siblings?

:?: :?:

Peter
TC 10.xx / #266191
Win 10 x64
Post Reply