Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Moderators: Hacker, petermad, Stefan2, white
Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Hello,
Is it possible to have an internal "cm_" command that performs :
- read the [Colors] & [searches] sections
- & then, reapply the "filters" (like "cm_SwitchColorsByFileType")
I'm used to assign file extension directly within the TC .ini [searches] keys, but always needs to stop & restart TC to apply it...
Thx.
Is it possible to have an internal "cm_" command that performs :
- read the [Colors] & [searches] sections
- & then, reapply the "filters" (like "cm_SwitchColorsByFileType")
I'm used to assign file extension directly within the TC .ini [searches] keys, but always needs to stop & restart TC to apply it...
Thx.
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Redirect the Searches section and point it to an link.
Then you can swap the link without restarting TC.
Then you can swap the link without restarting TC.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)

Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Example:
Replace in your Wincmd.ini the [Searches} section with all its entries with
[searches]
RedirectSection=Searches.ini
Store the replaced section in a file named Searches1.ini
Make a link named Searches.ini to the file Searches1.ini
Now you can just swap the link and let in point to another file, Searches2.ini for example.
Replace in your Wincmd.ini the [Searches} section with all its entries with
[searches]
RedirectSection=Searches.ini
Store the replaced section in a file named Searches1.ini
Make a link named Searches.ini to the file Searches1.ini
Now you can just swap the link and let in point to another file, Searches2.ini for example.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Thank you, clever idea, works as you explained
... but unfortunately, not as I "guessed" => I used this to assign colors to patterns, shown in TC's panels...
OK on Config "searches"
1. WINCMD.INI
2. Create SearchesClr.ini
3. mklink /H Searches.ini SearchesClr.ini
=> OK, works fine... in the Alt+F7 & "Load/Search"
4. Create a new SearchesClrInverted.ini file
5. mklink /H Searches.ini SearchesClrInverted.ini
=> OK, works fine (on new patterns)... in the Alt+F7 & "Load/Search"
---
(but) KO on "assigned colors" to "search file patterns" on files/folders within TC's panels
(The joke is, "there's always a but") => I'm used to quickly assign color to (new) search pattern using a script to directly write into TC .ini (*)... and unless I restart TC, colors are not re-applied within TC's panels
( Like : https://ibb.co/BKLtwdw )
That's why I initially suggested for a specific "cm_" command to re-read both [searches] and [Colors] sections to re-apply pattern filters/colors in live...
---
(*) I got a quite advanced script that, for files/folders selected, update my TC .ini file with files/folders patterns and matching (or requested to user) colors (in [Colors] & [searches] sections)... and then, restart TC (<- it's this last step that I'd like to avoid, and replace it by an internal "re-read in live" command)
... but unfortunately, not as I "guessed" => I used this to assign colors to patterns, shown in TC's panels...
OK on Config "searches"
1. WINCMD.INI
Code: Select all
[searches]
RedirectSection=Searches.ini
Code: Select all
[searches]
ColorRed_SearchFor=*-KO*;*.no;*.ko
ColorRed_SearchIn=
ColorRed_SearchText=
ColorRed_SearchFlags=0|002002000020|||||||||0000|||
ColorGreen_SearchFor=*-OK*;*.yes;*.ok
ColorGreen_SearchIn=
[etc...]
=> OK, works fine... in the Alt+F7 & "Load/Search"
4. Create a new SearchesClrInverted.ini file
5. mklink /H Searches.ini SearchesClrInverted.ini
=> OK, works fine (on new patterns)... in the Alt+F7 & "Load/Search"
---
(but) KO on "assigned colors" to "search file patterns" on files/folders within TC's panels
(The joke is, "there's always a but") => I'm used to quickly assign color to (new) search pattern using a script to directly write into TC .ini (*)... and unless I restart TC, colors are not re-applied within TC's panels

That's why I initially suggested for a specific "cm_" command to re-read both [searches] and [Colors] sections to re-apply pattern filters/colors in live...
---
(*) I got a quite advanced script that, for files/folders selected, update my TC .ini file with files/folders patterns and matching (or requested to user) colors (in [Colors] & [searches] sections)... and then, restart TC (<- it's this last step that I'd like to avoid, and replace it by an internal "re-read in live" command)
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
2Mjolnir
Otherwise try cm_Exit 5
Have you tried if CM_REREADSOURCE 1, 2 or 3 helps.Help wrote:CM_REREADSOURCE 1: forces refresh even if nothing has changed in that directory, e.g. to re-load icons and overlays
2: re-applies automatic view mode change to current directory
3: both
Otherwise try cm_Exit 5
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Hum , unfortunately, yes, already tried command "CM_REREADSOURCE" (with none, and even with different parameters,1 or 2 or 3), but does not reread the TC .ini sections (or, at least, read it , but not apply changes in live in TC's panels
)
"cm_Exit 5" -> works, but restart TC (it's the "restart order" command I use)...

"cm_Exit 5" -> works, but restart TC (it's the "restart order" command I use)...
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !