Page 1 of 1

add a sum option in custom view

Posted: 2025-05-22, 03:48 UTC
by nsp
It could be nice to have on Custom Columns or Custom View Mode a way to ask for a sum or an average for a column Total/Selected to appear in the summary on the panel bottom. Like for number of File, size...
This can for sure only works on calculated numeric column.
Suggestion to signal it:
  • Adding [ S ] for sum or [ A ] for average after the name of custom column
  • inside call of a wdx plugin like [=tc.size{SA}]
  • with a new column in Custom Column Editor
  • ???
It complement the suggestion https://www.ghisler.ch/board/viewtopic.php?t=80667.

Re: add a sum option in custom view

Posted: 2025-05-22, 07:32 UTC
by ghisler(Author)
I had considered this, but it has a big disadvantage: Currently TC only gets values of a column when the line is displayed, except when sorting by that column. With such a field in the footer, TC would have to load all the fields first, which would make opening directories very slow.

Re: add a sum option in custom view

Posted: 2025-05-22, 12:00 UTC
by nsp
Why not a partial solution to just sum/average values of selected lines and have on demand sum/average all with hotkey or Click on summary area. This will not slow down regular directory changes. Also, i'm not sur that many users use same custom columns all the time.

Re: add a sum option in custom view

Posted: 2025-05-23, 07:36 UTC
by ghisler(Author)
User presses Ctrl+A or Shift+End -> TC becomes unresponsive for several seconds or minutes.

Re: add a sum option in custom view

Posted: 2025-05-23, 08:37 UTC
by nsp
ghisler(Author) wrote: 2025-05-23, 07:36 UTC User presses Ctrl+A or Shift+End -> TC becomes unresponsive for several seconds or minutes.
I prefer to take the risk rather not have it done at all !
Show a dialog in case you need to add file without any calculated column to sum/average asking for on demand calculation or abort !

Being so conservative is like for Security topic, preventing user for their own safety to do some stuff have the result to prevent the user to work easily or force him to find hack.

Re: add a sum option in custom view

Posted: 2025-05-30, 09:59 UTC
by solid
Support this request.

I often need the sum of duration of all or selected video or audio files in a folder.

Currently, I have custom columns display showing duration pulled from mediainfo wdx, then I copy the contents of the panel and paste in Excel and do the sum there. The built-in sum option will save those many steps.

In the folder with many files, it may take a while to display the duration and other info for all the files, but that's something expected.

Re: add a sum option in custom view

Posted: 2025-05-30, 10:17 UTC
by Dalai
2solid
You can use MediaTime to get the duration sum of all files in a directory. However, I don't have a solution for the case that one needs only the duration of some files (as opposed to all).

Re: add a sum option in custom view

Posted: 2025-05-30, 10:27 UTC
by solid
2Dalai
Thx.
I'm aware of that plugin, but as you already pointed out it is not useful for summing selected files and that is the most used scenario in my case.
Moving selected files to a subfolder to use the plugin on those, also, is not a feasible workaround because often files are locked as they are in use by other software.

Re: add a sum option in custom view

Posted: 2025-05-30, 10:43 UTC
by Dalai
2solid
You could create hardlinks of the selected in a different directory (within the same volume), or symlinks which also works across volumes, but creation of such links requires elevation. But it's an extra step either way.

Re: add a sum option in custom view

Posted: 2025-06-01, 09:17 UTC
by nsp
Dalai wrote: 2025-05-30, 10:43 UTC 2solid
You could create hardlinks of the selected in a different directory (within the same volume), or symlinks which also works across volumes, but creation of such links requires elevation. But it's an extra step either way.
Creating hardlink in a working folder takes same time as using an excel when invoking cm_CopyHdrFileDetailsToClip with selected files.

Re: add a sum option in custom view

Posted: 2025-06-01, 18:36 UTC
by Fla$her
Dalai wrote: 2025-05-30, 10:17 UTC I don't have a solution
In person or on the forum?