Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Moderators: Hacker, petermad, Stefan2, white
Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
I would like to create a color filter to highlight specific folders or files that I want to stand out in the file list of certain parent folders that have many entries. Say there are 200 text files in Folder C:\Test\ and I usually want to select and view the file ViewMe.txt in that folder. So I would like its name to be drawn in pink, for example, so that I can spot it quickly. And likewise for maybe another 100+ files or folders all across my file system.
What I am currently doing is simply to rename such files and append a trailing underscore to the filename, e. g. as ViewMe_.txt. I have a global color filter for such files and folders and it works great, just the way I want it to, with hardly any false positives. The only problem is that this messes with backups. Every time I "add" a file to this color filter group by renaming it, the backup software might not back it up anymore because the file name has changed. Or if it is a folder name, it will be copied to the target backup folder a second time, which might cause problems if it's a large folder etc.
To cut a long story short, I'd like to use a script triggered via a hotkey (something TC-internal or Autohotkey) to simply add the paths of the files and folders I want highlighted to a .txt file somewhere when I have them selected in the file list. So navigate to ViewMeToo.txt, press hotkey, Path is added to .txt file. For this modus operandi to work, I would need to tell TC to color the name of any file or folder found in that list according to the color setting for that filter when it shows up in the file list.
Is there currently a way to do this? If not, I'd like this to be a feature request, please.
Maybe someone else is using a less "invasive" method than changing the file name with good success for similar purposes? Maybe I could base it on file descriptions instead?
PS: Imge illustrating my trailing underscore method below, it sets the color for files or folders to white...
Thank you!
Image: https://imgur.com/a/9ZMrP83
What I am currently doing is simply to rename such files and append a trailing underscore to the filename, e. g. as ViewMe_.txt. I have a global color filter for such files and folders and it works great, just the way I want it to, with hardly any false positives. The only problem is that this messes with backups. Every time I "add" a file to this color filter group by renaming it, the backup software might not back it up anymore because the file name has changed. Or if it is a folder name, it will be copied to the target backup folder a second time, which might cause problems if it's a large folder etc.
To cut a long story short, I'd like to use a script triggered via a hotkey (something TC-internal or Autohotkey) to simply add the paths of the files and folders I want highlighted to a .txt file somewhere when I have them selected in the file list. So navigate to ViewMeToo.txt, press hotkey, Path is added to .txt file. For this modus operandi to work, I would need to tell TC to color the name of any file or folder found in that list according to the color setting for that filter when it shows up in the file list.
Is there currently a way to do this? If not, I'd like this to be a feature request, please.
Maybe someone else is using a less "invasive" method than changing the file name with good success for similar purposes? Maybe I could base it on file descriptions instead?
PS: Imge illustrating my trailing underscore method below, it sets the color for files or folders to white...
Thank you!
Image: https://imgur.com/a/9ZMrP83
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
29kvD38n6
Maybe this can help you: viewtopic.php?p=354857#p354857 When set up as described you just navigate to the file, press Crtl+Z, write for color=orange and press F2.
It can even be automated to a button with the OPENATTRIBUTES= parameter
Maybe this can help you: viewtopic.php?p=354857#p354857 When set up as described you just navigate to the file, press Crtl+Z, write for color=orange and press F2.
It can even be automated to a button with the OPENATTRIBUTES= parameter
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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
That looks very promising. I'll give it a go!
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
29kvD38n6
The recipe to 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:
And this in the [Colors] section:
(change 1 if you already have color filters)
And this in the [attrplugin] section of your wincmd.ini file:
Then you can use this button to set the color for one or more selected files:
And this button to remove the color again:
08-01-2022, 23:46 EDITED the [attrplugin] here above.
Notice the first buttons ADDS color=orange to the description of the file. The second button removes the entire description - so con't use it on files with descriptions you want to keep.
The recipe to 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
Code: Select all
ColorFilter1=>Color orange
ColorFilter1Color=33023
And this in the [attrplugin] section of your wincmd.ini file:
Code: Select all
ColorOrange=tc.comment := "[=tc.comment] color=orange"
ColorNone=tc.comment := ""
Then you can use this button to set the color for one or more selected files:
Code: Select all
TOTALCMD#BAR#DATA
OPENATTRIBUTES =ColorOrange
wcmicons.dll,39
Orange filename color
-1
Code: Select all
TOTALCMD#BAR#DATA
OPENATTRIBUTES =ColorNone
wcmicons.dll,40
No filename color
-1
To make the buttons:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
08-01-2022, 23:46 EDITED the [attrplugin] here above.
Notice the first buttons ADDS color=orange to the description of the file. The second button removes the entire description - so con't use it on files with descriptions you want to keep.
Last edited by petermad on 2022-01-08, 22:54 UTC, edited 6 times in total.
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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Hey man, amazing! Thank you so much for taking the time to explain in detail!
I've got all set up now, color changed to white for my needs and set to a hotkey via UserCmd.ini rather than a button. Just what I wanted.
You da man!!
I've got all set up now, color changed to white for my needs and set to a hotkey via UserCmd.ini rather than a button. Just what I wanted.
You da man!!
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
29kvD38n6
Notice that I made a change to the [attrplugin] section so the color= is ADDED to the description, if there already is one.
Notice that I made a change to the [attrplugin] section so the color= is ADDED to the description, if there already is one.
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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Right, adopted that as well, cheers!
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
There is a small problem with removing the color.
It also removes any other comment which was preserved while adding the color.
It also removes any other comment which was preserved while adding the color.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 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.51 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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
2Horst.Epp
That's why I wrote:
I could make button two set the color to black (or whatever the user uses as default), and then prioritize colorBlack higher than colorOrange, but then it would never be possible to set it to orange again without editing the description file manually.
That's why I wrote:
I don't see anyway to avoid that.petermad wrote: The second button removes the entire description - so con't use it on files with descriptions you want to keep.
I could make button two set the color to black (or whatever the user uses as default), and then prioritize colorBlack higher than colorOrange, but then it would never be possible to set it to orange again without editing the description file manually.
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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Guess you'd have to use an external script to remove just that line from the .ion file if you use file descriptions for other purposes (which I don't). Still a very happy camper here.
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Its still a fine solution.
I will make my version which uses the NTFS_DIZ plugin adding an ADS comment.
This will allow to color file names but in addition I have indexed that ADS stream in Everything.
So I can find all files with such an attribute in seconds.
This attribute also survives copying a file outside of TC with XYplorer or Windows Explorer.
Its bound to NTFS of course but all volumes I have including USB are NTFS formatted.
I will make my version which uses the NTFS_DIZ plugin adding an ADS comment.
This will allow to color file names but in addition I have indexed that ADS stream in Everything.
So I can find all files with such an attribute in seconds.
This attribute also survives copying a file outside of TC with XYplorer or Windows Explorer.
Its bound to NTFS of course but all volumes I have including USB are NTFS formatted.
Last edited by Horst.Epp on 2022-01-09, 18:09 UTC, edited 1 time in total.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 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.51 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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
Smart idea.Horst.Epp wrote: 2022-01-09, 12:46 UTC I will make my version which uses the NTFS_DIZ plugin adding an ADS tag.
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: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
If you are a programmer, you could make a simple personal wdx plugin (script, or anything ) that read your list file and compare with requested file to return a color or whatever.
Then use search expressions using your plugin to colorize.
Then use search expressions using your plugin to colorize.
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
nsp,
That's a great idea. Using [wdx] WinScript Advanced Content Plugin (x86\x64) (new) this should be a matter of minutes, if anyone needs such functionality.
Roman
That's a great idea. Using [wdx] WinScript Advanced Content Plugin (x86\x64) (new) this should be a matter of minutes, if anyone needs such functionality.
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.
Re: Define colors by file type: Add file or folder names on the fly ('favorites' based on list in .txt file?)
I use the coloring like bookmarks.
Using the NTFS_diz plugin adding ADS streams has the benefit of indexing with Everything
and survives operations with other file managers and Explorer.
Using the NTFS_diz plugin adding ADS streams has the benefit of indexing with Everything
and survives operations with other file managers and Explorer.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 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.51 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