How to always display all folder sizes in every directory?

English support forum

Moderators: white, Hacker, petermad, Stefan2

quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

For me, View Mode + cm_CountDirContent only works partially. Switching to a subdir, I see no dir sizes. Switching back to the parent, ,I might see sizes, depending on how I configure the path. But nothing worked for me in all cases. Not even specifying sub-dirs specifically.

Oddly I do get sizes if I switch to another tab and back. I was tinkering with some usercommand, switch to a known empty dir and back, but I gave up. Instead I just made a simpler shortcut for cm_CountDirContent, CtrlShiftS.
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: How to always display all folder sizes in every directory?

Post by *tuska »

Hi,
try this:
  1. View mode, e.g. "FolderSizesInDirectories" - Auto-run commands: *cm_CountDirContent
    Leave all other options unchanged.
  2. Auto Switch Mode
    [x] Automatically switch View mode on directory change:
    • Rule: +: Must match D:\Test\* [Click on "Help"-button: ... Examples: c:\photos\* The folder "photos" and all subfolders]
      -OR-
    • Rule: D: Directory [Click on "Help"-button to see more options...]
    • Set this mode: FolderSizesInDirectories <= NameOfYourViewMode
    • Apply, OK

      If a View mode with Auto Switch Mode meets another already existing View mode with Auto Switch Mode,
      then it may be necessary to prioritize when changing the Auto Switch Mode, i.e. to change the order.
      TC goes through the list of rules from top to bottom, applying the first that applies.
  3. Option
    Configuration - Options... - Operation - Calculate space occupied by subdirectories - [x] 'Everything' => TICKED!
    The tool 'Everything' is required if you choose this option. Please see my signature.
    If the tool 'Everything' is integrated, the display of the space required by directories is almost instantaneous.
    HISTORY.TXT
    28.08.17 Release Total Commander 9.10 beta 1 pre 1 (private beta) (32/64)
    23.08.17 Added: Configuration - Options - Operation: Option to use "Everything" to get directory sizes via Alt+Shift+Enter and/or spacebar.
    Needs recent Everything version with folder size index enabled (32/64)
  4. Hint
    Menu 'Help' - 'Keyboard' wrote:ALT+SHIFT+ENTER The contents of all directories in the current directory are counted.
    The sizes of the directories are then shown in the "full" view instead of the string <DIR>. Abort by holding down ESC key.

Windows 10 Pro (x64) Version 21H2 (OS build 19044.1387)
TC 10.00 x64/x86 | 'Everything' 1.5.0.1286a (x64)
Search queries: TC <=> 'Everything' | 'Everything' 1.4.1.1014 (x64)
Switching from Everything 1.4 to 1.5
Overview: View Mode | Auto Switch Mode | Custom columns view
quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

I was getting ready to say I tried all that stuff and a lot more, until I noticed the asterisk:
*cm_CountDirContent
NOW it works.
Thanks!

This is a great tip, and necessary, if you want counts in sub directories (I always do).
I didn't see it mentioned in other posts except one German post (also by tuska).
quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

One oddity I noticed, even with *cm_CountDirContent:
If I switch tabs via cm_SwitchToPreviousTab (or next), or the mouse, and two adjacent tabs having the same view mode with *cm_CountDirContent, then no sizes shown.
Any tab in between without the same view mode, then sizes OK.
I figured out a workaround: Create another view mode, different name, same columns view, auto-run *cm_CountDirContent.
In Auto Switch Mode, use the new mode.
Then sizes OK even switching adjacent tabs.
Probably best to create different modes for any dir in Auto Switch Mode.
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: How to always display all folder sizes in every directory?

Post by *tuska »

quantum wrote: 2021-12-10, 09:57 UTC ... If I switch tabs via cm_SwitchToPreviousTab (or next), or the mouse, and two adjacent tabs having the same view mode
     with *cm_CountDirContent, then no sizes shown. ...
In such a case, you could try this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_RereadSource 2

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

0
-1
If the button works, you could add the command: cm_RereadSource 2 in 'View mode', e.g. as follows:

Code: Select all

Auto-run commands: *cm_CountDirContent,cm_RereadSource 2
Otherwise, you have already found a workaround...
quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

Interesting idea! I tried it, without a button, I added "cm_rereadsource 2" to the Auto-run commands of a view mode. Then set multiple dirs to the same mode. It didn't seem to do much, but then switching to the opposite pane, TC locked up, in some refresh loop. I had this before when trying to add commands along with cm_CountDirContent. In this case I had to edit TC's ini (after force closing it) because it locked up on start.

Also, some clarity. The issue with no sizes after switching seems to happen if in a sub dir of the auto switch folder, and when tabs have the same View Mode. Root seems OK regardless.

Another oddity, and regardless of sub dir, and regardless of having different modes, if I have two identical adjacent tabs e.g., both d:\temp, then I don't see sizes after switching between them. Add any other tab between the dupes, then dupes work fine.

Not a big deal for me at all, I wouldn't normally have adjacent dupes. I only noticed it when making a new tab, and temporarily had adjacent dupes.

So for me, make separate View Modes for anything in Auto Switch Mode. I have about 6 total so not a big issue.

Finally, really awesome to see this working, and working for sub dirs! 😉 Already I wouldn't want to be without it.
quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

Something else I noticed, copying to the target pane, sizes are lost, until I get them back by cm_CountDirContent shortcut or changing dir to subdir or parent, and back.
Same thing deleting, although it's the source pane.

I tried fiddling with a user command for deleting, then calling cm_CountDirContent.
But it seems user commands run asynchronously. So cm_CountDirContent was running right away, and when delete was finished, sizes dissapear. Not sure I want to bother with it more. Works well enough and much better than before.
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: How to always display all folder sizes in every directory?

Post by *tuska »

2quantum
I think that there can always be situations in which one intentionally [or unintentionally?] switches off 'View mode' with 'Auto Switch Mode'.

Example (intentionally):
View Mode + Auto Switch Mode present.
Descending sorting by date is overridden and sorting by name is switched on.

In such cases, the above button with command: cm_RereadSource 2
(re-applies automatic 'View mode' change to current directory) has often helped me.

I find it very difficult to intercept every possible constellation of a function programmatically
and probably there is always the question of effort (this is just my layman's opinion as a user).
quantum
Junior Member
Junior Member
Posts: 49
Joined: 2004-02-29, 01:42 UTC

Re: How to always display all folder sizes in every directory?

Post by *quantum »

I didn't realize there were commands for switching modes, if I understand what you mean. But anyway I just looked and found cm_ToggleAutoViewModeSwitch. I bound that to a key, and I'm glad to have it. In rare cases with huge files in a dir, that's a big help.
User avatar
Phred
Senior Member
Senior Member
Posts: 375
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Re: How to always display all folder sizes in every directory?

Post by *Phred »

I'm reading this thread slowly, trying to walk before I can run.
(I'm hoping that TC's 'All file details' list view will display all folder sizes in every directory - as per the thread title.)

As a starter, the DirSizeCalc Charts 1.10 site/page says:
The linked download is the standalone version of DirSizeCalc Charts. Alternativelly you may download the addon version.
https://totalcmd.net/plugring/dirsizecalc_charts.html

Does anyone know where this standalone version is? I'd like to know what it is that I'm persuing.
Then I might try integrating it into TC, though DirSizeCalc does appear to be a multi-facetted contrivance utilising View Modes, Auto-Switching, Custom Columns, and Everything's co-operation.
(Imagine if apps were like this. :roll: )

Yes, I saw Author Ghisler's comment that all folder sizes acquisition would slow TC down too much, but we have Everything now.
I tried adding-on DirSizeCalc, and nothing happened. Nothing I could see, and, yes, it went in - with a bit of prestidigitation: TC doesn't seem to tell add-ons what instance of itself is running, e.g. C:\Program Files\Total Commander Beta\TOTALCMD64.EXE (still all-caps). But that's for another thread.
DSC doesn't have a Readme.txt nor does it add help/how-to text to Help. There is a readme.html down in the add-ons, err.. plugins, folder that Lister can just manage, but it's not very good (English version).

(I hate to say that TC is looking more like a dinosaur :( but what percentage of the population is going to go through the gymnastics of wrenching a DirSizeCalc add-on into place and learn how to make it work? So sad. But that's for another thread.)
Regards, PhredE
Licence holder since 1999
Awaiting a $D donors-token for the title-bar so we can display that we have donated further.
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: How to always display all folder sizes in every directory?

Post by *Gral »

Did you try new TC 10.50 (now beta7) and new function?
http://gral.y0.pl/tc/foldersize.png
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: How to always display all folder sizes in every directory?

Post by *tuska »

Phred wrote: 2022-05-30, 20:20 UTC ... we have Everything now. ...
I can recommend the following regarding the display of folder sizes in Total Commander:
  1. TC 10.50beta
  2. Everything 1.5 Alpha - always the latest version - currently: Everything 1.5.0.1315a (x64)
  3. In TC 10.50b7: Menu "Configuration" - "Options..." - Operation - Calculate space occupied by subdirectories:
    [✓] 'Everything' -> Automatic, only with 'Everything'
  4. In TC 10.50b7: wincmd.ini - section [Configuration]: Everything=Path\to\Everything64.exe -startup
    ... -OR- ... Everything=Path\to\Everything.exe -startup
    e.g. Everything=C:\Tools\Everything\Everything64.exe -startup
  5. Everything: Menu "Tools" - "Options" - "General":
    [✓] Start Everything on system startup
    [✓] Everything Service
  6. Everything: Menu "Tools" - "Options" - "Indexes":
    [✓] Index folder size
HISTORY.TXT wrote: 12.04.22 Release Total Commander 10.50 beta 1
15.03.22 Added: wincmd.ini [Configuration] GetDirSize=0 0:Manual:
Alt+Shift+Enter, 1:Automatic, local drives only, 2:Automatic, also on network, 3:Automatic, only with 'Everything' (32/64)

Windows 10 Pro (x64) Version 21H2 (OS build 19044.1706)
TC 10.50b7 x64/x86 | 'Everything' 1.5.0.1315a (x64)
Switching from Everything 1.4 to 1.5
Total Commander <=> 'Everything'
Troubleshooting
User avatar
Phred
Senior Member
Senior Member
Posts: 375
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Re: How to always display all folder sizes in every directory?

Post by *Phred »

Thank you gentlemen, that looks superb.
It works here with Everything instantly in 10.50b7. That's why I love TC; I really do.
I notice that a description of these options is already in the new Help text.
(In the section on 'Before copying/deleting' there's a mis-expression, q.v. "This allows you Total Commander to show a second percentage bar (overall complete).")


This discussion does suggest that TC could really benefit from some means of promulgating its features as they newly appear. So many are buried in its capabilities, undiscovered. Yes, there's a newletter link on the What's new page and history.txt files, but that isn't easy reading.
I do hesitate to invoke the memory of Clippy in Microsoft Office, but perhaps we keen users could devise informational context-sensitive popup postcards that could appear periodically, as long as they're well expressed, and graphical. Create a framework for user-contributed graphics + text to be inserted. Yes, I know they can be annoying.
Alternatively, descriptive text could pop up (tooltips) near every configuration setting, a common convenience nowadays (think Everything). Tips with links to Help. Far enough away not to be obscured by the cursor pointer to accommodate larger-than-default pointers. But this is a topic for another thread somewhere.
Regards, PhredE
Licence holder since 1999
Awaiting a $D donors-token for the title-bar so we can display that we have donated further.
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: How to always display all folder sizes in every directory?

Post by *linuxy »

petermad wrote: 2020-11-10, 12:19 UTC You can enable automatic directory size calculation, by adding the cm_CountDirContent command to the "Auto-run commands:" field of a "View Mode" - But, you have to add it to ALL View Modes where you want automatic directory size calculation, and you have to use those View Modes in "Auto Switch Mode"
Hello. Thanks for sharing this info. I set this up but can't understand what you mean by using those in auto switch mode. What settings do I use for the Auto Switch page, can you show a screenshot? Thank you kindly.
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to always display all folder sizes in every directory?

Post by *petermad »

Hello. Thanks for sharing this info. I set this up but can't understand what you mean by using those in auto switch mode.
Since TC 10.50 you don't need to use Auto Switch Mode for that - you can enable Automatic dir size display in the Options for Operation - see: https://tcmd.madsenworld.dk/autodirsize.png
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply