Is there a way to clorize whole directory tree where a new file is created ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Quaid
Junior Member
Junior Member
Posts: 35
Joined: 2009-06-23, 09:21 UTC
Location: Italy

Is there a way to clorize whole directory tree where a new file is created ?

Post by *Quaid »

Hi all !

I would like to know where a file is created by looking the root directories.

For instance (with Age WDX plugin) if Windows Update is downloading something, files are located into
C:\Windows\SoftwareDistribution\Download and ONLY Download directory is highlighted.

I think is useful if all tree chain Windows\SoftwareDistribution\Download changes color for X minutes, so if I follow the root directory I can go in deep until I found the file is created right now.

Thanks Christian and all community !
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *tuska »

Hi,

Regarding colouring of files and folders, I have noticed, that this is possible automatically only for the
- contents of the displayed folder (folders and files)
- parent folder

I see an advantage in that, for example, newly created folders or files are automatically coloured
in order to find them in Total Commander more easily later (colouration e.g. for 10 minutes).

Example(s)
- If a file is created, the file AND the parent folder in which the file is located is coloured.
- If a subfolder is created, the parent folder is coloured.

D:\zzzz\CCC\ever\z.txt

If the file "z.txt" is created, ONLY the folder "ever" and the file "z.txt" are coloured,
but not the top folder "zzzz"!
 

 
In such cases I would therefore advise you to use the tool "Everything" - which can also be used for search queries in TC -
in order to perform real-time searches directly in 'Everything' [or in Total Commander].
The search result in Everything can be transferred to Total Commander with a mouse click.
The set parameters in Everything can be changed very easily. Bookmarks and filters can be used as well.

Examples of search queries directly in Everything:

Code: Select all

C:\Windows\SoftwareDistribution\Download <dc:last10mins|dm:last10mins|da:last10mins>
- OR - only files...
files: C:\Windows\SoftwareDistribution\Download <dc:last10mins|dm:last10mins|da:last10mins>

Code: Select all

c: <dc:last10mins|dm:last10mins|da:last10mins>
- OR - only files...
files: c: <dc:last10mins|dm:last10mins|da:last10mins>
Although the number of folders and files changes constantly in the status bar in Everything,
it may be advisable to refresh the view with the F5 key (Menu "View" > Refresh F5).

Menu "Help" > Search Syntax

Code: Select all

< >	Grouping
dc:	Search for files and folders where the date created matches the specified date.
dm:	Search for files and folders where the date modified matches the specified date.
da:	Search for files and folders where the date accessed matches the specified date.
For the reasons mentioned, I use both the tool 'Everything' and the plugin Age, version 1.04 for this purpose.


Windows 11 Pro (x64) Version 22H2 (OS build Build 22621.2428)
TC 11.02RC2 x64/x86 | 'Everything' 1.5.0.1357a (x64)
Search queries: TC <=> 'Everything' | 'Everything' 1.4.1.1024 (x64)
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *petermad »

tuska wrote:For the reasons mentioned, I use both the tool 'Everything' and the plugin Age, version 1.04 for this purpose.
I tested the Age plugin in the Plugins tab with: Changed < 10 minutes against the Advanced tab -> Not older than 10 Minute(s) and the approach in the Advanced tab seems much faster. The Age plugin works a little faste when 'Everything' is disabled in "Find Files" General tab
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
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *tuska »

petermad wrote: 2023-10-16, 17:58 UTC
tuska wrote:For the reasons mentioned, I use both the tool 'Everything' and the plugin Age, version 1.04 for this purpose.
I tested the Age plugin in the Plugins tab with: Changed < 10 minutes against the Advanced tab -> Not older than 10 Minute(s)
and the approach in the Advanced tab seems much faster.
The Age plugin works a little faster when 'Everything' is disabled in "Find Files" General tab.
Thank you for pointing this out! :)

So far, I have not noticed anything in this regard, as the folders and files have coloured without any delay.
However, I have not tested myself how it would behave if I were to create a large number of files.
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *petermad »

2tuska

It is when I do a search in Find Files, that I can experience the difference.

I have always used the option in the Advanced tab for coloring files that are less than an hour and less that a day, without problems.
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
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *tuska »

petermad wrote: 2023-10-16, 18:15 UTC I have always used the option in the Advanced tab for coloring files that are less than an hour and less that a day, without problems.
I do not doubt your statements.
On the contrary, I will adjust my settings accordingly.
User avatar
Usher
Power Member
Power Member
Posts: 1726
Joined: 2011-03-11, 10:11 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *Usher »

petermad wrote: 2023-10-16, 18:15 UTC I have always used the option in the Advanced tab for coloring files that are less than an hour and less that a day, without problems.
Ditto
Andrzej P. Wozniak
Polish subforum moderator
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *tuska »

Colouring directories and files

Table of contents
  1. Save search
  2. Assign colour to the saved search
    1. Sequence of processing colour definitions for a saved search
    2. Subsequent change of colour
  3. Button: Refresh view
1. Save search - Alt+Shift+F7, Tab "Advanced"
  1. Search in separate process... Alt+Shift+F7
  2. On the "General" tab, the fields "Search for:" and "Search in:" should be empty(!) -
    => delete the content if necessary! <=
    Otherwise, no further changes to the settings on this tab need to be made.
  3. On the "Advanced" tab, make the following settings, for example
    ✅ Not older than: 10 Minute(s)
  4. No settings are required on the "Plugins" tab.
  5. Click on the "Load/Save" tab
  6. Click on the "Save" button
  7. Template name, e.g.: Modified_within-last-10-minutes
  8. OK
  9. Click on the saved search parameter "Modified_within-last-10-minutes".
    and check the status line: "*.*" ,<10m ..."
  10. Click on the "Cancel" button to close the separate search window.
  11. The topic "Save search" is now complete - the template has been created.
2. Assign colour to the saved search
  1. Menu "Configuration" - Select "Options..."
  2. Click on "Color", then in the same window at the bottom ...
  3. Click on "Define colors by file type..."
  4. Click on "Add..." (window with title line "Specify file type" appears)
  5. Click in the field below labelled "Or select predefined selection type".
  6. Then scroll to the saved search, which in this case is: "Modified_within-last-10-minutes"
  7. Click on the entry => the following is displayed above it as the specified file type: ">Modified_within-last-10-minutes".
  8. Click on the "OK" button below => the "Colour" window is displayed
  9. Select a colour in which new folders or files are to be displayed, e.g. GREEN ...
    Hue: 80, Saturation: 240, Brightness: 93 | Red: 0, Green: 198, Blue: 0
  10. Click on the "OK" button => The entry ">Modified_within-last-10-minutes" was created and is displayed in green.
  11. Click on the button "Dark<->Normal" to check how the font is displayed in normal or dark mode.
  12. Click on "OK", "OK"
  13. DONE!
  14. Test: Create a file or a folder => These should immediately show the font colour green.
    If this is not the case, the settings must be checked again.
  15. Emptied/Deleted Folders: Parent folders that have been emptied within the last 10 minutes,
    i.e. whose contents (folders and/or files) have been deleted, are also coloured!
  16. The command: cm_rereadsource 1 can cause a refresh of the view, i.e. remove colouring -> e.g. after 10 minutes.
    Please see the button below under point 3. ...
2.a. Sequence of processing colour definitions for a saved search
In the "Configuration" menu > Options... > Color > Define colours by file type...
the saved colour definitions for a saved search are processed FROM TOP TO BOTTOM!

The order can be changed by drag & drop.

Example 1:
Sequence:
... >Modified_within-last-10-minutes
... >Empty Directories

In this case, the color of the saved search will be "Modified_within-last-10-minutes" -> applied for 10 minutes.
Afterwords the color of the saved search "Empty Directories" will then be applied.

Example 2:
Sequence:
... >Empty Directories
... >Modified_within-last-10-minutes

In this case, the color of the saved search "Empty Directories" is applied.
The colour of the saved search "Modified_within-last-10-minutes" is NOT applied when a new folder is created.
2.b. Subsequent change of colour
  1. Menu "Configuration" - Select "Options..."
  2. Click on "Color", then in the same window at the bottom ...
  3. Click on "Define colors by file type..."
  4. Click on ">Modified_within-last-10-minutes" (without inverted commas), i.e. on the previously assigned name!
  5. Click on "Edit..." or press the spacebar
  6. Click on "OK"
  7. Select another colour, e.g. Hue: 120, Saturation: 80, Brightness: 90 | Red: 64, Green: 128, Blue 128)
  8. OK, OK, OK
  9. DONE!
3. BUTTON - cm_rereadsource 1 - please see point 2.16.

Code: Select all

TOTALCMD#BAR#DATA
cm_rereadsource 1

wcmicons.dll,86
cm_rereadsource 1 <-- forces refresh even if nothing has changed in that directory,|e.g. to re-load icons and overlays.|cm_rereadsource 2 re-applies automatic View mode change to current directory|cm_rereadsource 3 also forces a refresh if nothing has changed

0
-1
   Create a Button in the Buttonbar (copy/paste CODE)
  1. Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
  2. Right-click on any place in the button bar, then click on "Paste".
     ⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
  3. Option1: Point to the new button (slightly longer): 'Tooltip' is shown (-> description to the button).
                  A maximum of 259 characters is allowed for the tooltip. | = create line break, || = create | as separator character.
  4. Option2: Button bar - "Tooltip" field: A single space deactivates the display of the tooltip.
                  If the "Tooltip" field is empty, the content of the "Command" field is displayed.
  5. Option3: See FAQs and explanation: Button-code (TOTALCMD#BAR#DATA)  <-- <Ctrl+click on the link...>


 
Colouring empty folders

Table of contents
  1. Save search - Plugin "FileX"
  2. Assign colour to the saved search
    1. Sequence of processing colour definitions for a saved search
    2. Subsequent change of colour
1. Save search - Plugin "FileX" & 2. Colouring empty folders
  1. Download the plug-in "FileX - current version: FileX23.zip - 18.11.2016
  2. Install the plugin "FileX" by double-clicking on the file "FileX23.zip" in Total Commander(!).
    Follow the instructions... - After installing the plug-in, it is usually advisable to read the file "ReadMe.txt".
  3. Menu "Configuration" - Select "Options..."
  4. Click on "Color", then in the same window at the bottom ...
  5. Click on "Define colors by file type..."
  6. Click on "Add..." (window with title line "Specify file type" appears)
  7. Click on "Define..." (window with title line "Define selection" appears)
  8. Click on the "Plugins" tab and define the following settings...
  9. Check mark must be present for "Search in plug-ins"
  10. Plugin: ... select (with dropdown), namely ... filex
  11. Property: ... select (with dropdown), namely ... ZeroSizeDir
  12. OP: ... select (with dropdown), namely ............... =
  13. Value: ... select (with dropdown), namely ............ Yes
  14. Click on "Save"
  15. Template name: e.g. enter the name "empty folders" (without inverted commas).
  16. OK
  17. OK ... The "Colour" window appears
  18. Click on the colour, e.g. GREY (Hue: 160, Saturation: 0, Brightness: 120, Red/Green/Blue: 128)
  19. OK ... the window "Define colours by file type..." appears
  20. OK ... The "Configuration" window appears
  21. OK ... DONE!
  22. The command: cm_rereadsource 1 can cause an update of the view regarding colouring.
    Please see the button above... point 3.
2.a. Sequence of processing colour definitions for a saved search
In the "Configuration" menu > Options... > Color > Define colours by file type...
the saved colour definitions for a saved search are processed FROM TOP TO BOTTOM!

The order can be changed by drag & drop.

Example 1:
Sequence:
... >Modified_within-last-10-minutes
... >Empty Directories

In this case, the color of the saved search will be "Modified_within-last-10-minutes" -> applied for 10 minutes.
Afterwords the color of the saved search "Empty Directories" will then be applied.

Example 2:
Sequence:
... >Empty Directories
... >Modified_within-last-10-minutes

In this case, the color of the saved search "Empty Directories" is applied.
The colour of the saved search "Modified_within-last-10-minutes" is NOT applied when a new folder is created.
2.b. Subsequent change of colour
  1. Menu "Configuration" - Select "Options..."
  2. Click on "Color", then in the same window at the bottom ...
  3. Click on "Define colors by file type..."
  4. Click on ">Empty directories" (without inverted commas), i.e. on the previously assigned name!
  5. Click on "Edit..." or press the spacebar
  6. Click on "OK"
  7. Select another colour, e.g. Hue: 120, Saturation: 80, Brightness: 90 | Red: 64, Green: 128, Blue 128)
  8. OK, OK, OK
  9. DONE!
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: Is there a way to clorize whole directory tree where a new file is created ?

Post by *Fla$her »

Quaid wrote: 2023-09-20, 14:58 UTCI think is useful if all tree chain Windows\SoftwareDistribution\Download changes color for X minutes
Previously, the Tempus plugin was used for this. The author planned to improve it in terms of the choice of numerical comparison of time units, but the plans didn't budge. Starting from some TC 9.xx version, the plugin began to have problems with auto-updating dates.
For those wishing to improve the plugin the author provided sources.
Overquoting is evil! 👎
Post Reply