Size display vs. custom columns mode

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Size display vs. custom columns mode

Post by *jonathanpoulin »

Hi all,

This is my first post here. So first of all, I would like to say that I really like the power of Total Commander. I bought my license years ago but just started to use it seriously since a few weeks. This is for work mainly. The reason I wasn't using it in the past is because my previous job was not letting me install the softwares I wanted. Now my current job gives me freedom so I installed TC and I am happy! :D

Now the question. I defined a custom columns mode containing few columns including size. Using that, it seems that the size display setting (under Configuration->Display->Tabstops) is ignored in that case. I want to display the size as kbytes. Do I miss something? Is it by-design?

Thanks for clarification
Jonathan
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Size display vs. custom columns mode

Post by *tuska »

Hi,
jonathanpoulin wrote: 2021-01-16, 14:18 UTC I defined a custom columns mode containing few columns including size.
Which size? (-> Code?)
jonathanpoulin wrote: 2021-01-16, 14:18 UTC Using that, it seems that the size display setting (under Configuration -> Display -> Tabstops) is ignored in that case.
Yes, a "custom columns view" overrides the setting under Configuration -> Display -> Tabstops.
jonathanpoulin wrote: 2021-01-16, 14:18 UTCI want to display the size as kbytes.
In the "custom columns view", a column for the display in kbytes must be specified, e.g.

Code: Select all

[=tc.size.kbytes]
Regards,
Karl
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Size display vs. custom columns mode

Post by *Stefan2 »

Hi and welcome Jonathan.

For a custom column you utilize a plugin, as default the "tc"-plugin, as Karl shows.
Now it's the plugin who supply the possible options.

There are several plugins, read more:
PLUGINs - Find / Install / Remove a plugin
viewtopic.php?p=294671#p294671





 
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Size display vs. custom columns mode

Post by *jonathanpoulin »

Hi Karl,
tuska wrote: 2021-01-16, 14:53 UTC
In the "custom columns view", a column for the display in kbytes must be specified, e.g.

Code: Select all

[=tc.size.kbytes]
That's good! I just tried it and this is what I was looking for. And yes, this was clearly explained in the help file. This time I did not took a look there first... I saw that I can add a prefix and/or a suffix as well. I added suffix "kb".

Code: Select all

[=tc.size.kbytes" kb"]
I am impressed how TC is highly flexible. Great tool :!:

Thank you very much
Jonathan
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Size display vs. custom columns mode

Post by *jonathanpoulin »

Hi Stefan,
Stefan2 wrote: 2021-01-16, 17:12 UTC There are several plugins, read more:
PLUGINs - Find / Install / Remove a plugin
viewtopic.php?p=294671#p294671
Thanks for your time and for that link. In fact, I had already a content plugin installed.
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Size display vs. custom columns mode

Post by *tuska »

jonathanpoulin wrote: 2021-01-16, 18:13 UTC I added suffix "kb".

Code: Select all

[=tc.size.kbytes" kb"]
When setting up the columns, you can also put "kb" in the column "Caption".
This column is intended for column headings and in this case you could even save some space (by displaying kilobytes) in this column.
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Size display vs. custom columns mode

Post by *jonathanpoulin »

tuska wrote: 2021-01-16, 22:15 UTC When setting up the columns, you can also put "kb" in the column "Caption".
This is a better idea in that case. I did the change. Thanks!
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Size display vs. custom columns mode

Post by *jonathanpoulin »

Hi,

This is an old post from me. Now I have a side-question to it.

If I define field contents as:

Code: Select all

[=tc.size.kbytes" kb"]
I see that directories are outputted as:

Code: Select all

<DIR>   kb
Is there a way to prevent it and instead display them normally? Like that (without suffix):

Code: Select all

<DIR>
Thanks
Jonathan
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Size display vs. custom columns mode

Post by *tuska »

jonathanpoulin wrote: 2024-01-19, 16:01 UTC I see that directories are outputted as:

Code: Select all

<DIR>   kb
Is there a way to prevent it and instead display them normally? Like that (without suffix):

Code: Select all

<DIR>
Yes, with WinScript Advanced 1.7 - wdx_Content Plugin
Details to follow...
User avatar
jonathanpoulin
Junior Member
Junior Member
Posts: 28
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Size display vs. custom columns mode

Post by *jonathanpoulin »

tuska wrote: 2024-01-19, 16:37 UTC Yes, with WinScript Advanced 1.7 - wdx_Content Plugin
Details to follow...
Ok, great! I'll take a look. Thanks
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Size display vs. custom columns mode

Post by *tuska »

Hi,

Before you get started, I would like to inform you of the following (unfortunately I missed this fact before):
- For folders(!), the "Size in KB" column no longer displays a value.
- "<DIR>" is also no longer displayed in the column "Size in KB". Unfortunately, I don't know the solution to this either.
 
  1. Install the plugin "WinScript Advanced 1.7 - wdx_Content Plugin" by double-clicking on the file "wdx_WinScriptAdv_1.7.zip" in Total Commander(!).
     
  2. Add the following to the "options.ini" file (%COMMANDER_PATH%\Plugins\wdx\WinScriptsAdv_wdx\options.ini)
    in the [Script] section in line "ActiveScripts=" .......: ExplorerKBRounding
    For me, for example, it currently looks like this:
    ActiveScripts=MinutesAgo|CheckEncoding|Signature|ExplorerKBRounding|FilesCount|GetDetailsOf|NTLink|ContinuousNumbers|
     
  3. In the WinScript Advanced "options.ini" file, add this section (including section name!) as follows:

    Code: Select all

    [ExplorerKBRounding]
    ; File Size with explorer rounding in kB
    
    Script=ExplorerKBRounding.vbs
    content=Size in KB
    extensions=*
    FoldersPaths=0
  4. Save the .vbs file with a text editor and place it in the "Scripts" folder in the path mentioned.
    %COMMANDER_PATH%\Plugins\wdx\WinScriptsAdv_wdx\Scripts\ExplorerKBRounding.vbs
    Show same file size as Windows Explorer? - Author: HolgerK

    Code: Select all

    '==============================================================================
    'Script for WinScriptAdv content plugin
    '   content  - file size in kB (Like Explorer column)
    '==============================================================================
    Set FSO=CreateObject("Scripting.FileSystemObject")
    content=Result(filename)
    Set FSO=Nothing
    
    Function Result(pPath)
     If FSO.FileExists(pPath) Then
      set F=FSO.GetFile(pPath)
      Result=Round((F.Size+512)/1024)
      set F=Nothing
     End If
    End Function
    
  5. Configure this custom columns view...

    Code: Select all

    Caption: 	Size in KB
    Field contents: [=winscriptsadv.Size in KB]
    Result:
    - For folders(!), the "Size in KB" column no longer displays a value.
    - "<DIR>" is also no longer displayed in the column "Size in KB". Unfortunately, I don't know the solution to this either.

    Remark:
    To display the folder size, simply press the space bar or Ctrl+L.
    The display takes place in real time using the "Everything" tool in Total Commander.
  6. Exit and restart Total Commander, e.g. with this BUTTON

    Code: Select all

    TOTALCMD#BAR#DATA
    CM_EXIT 9
    
    TOTALCMD.EXE,25
    CM_EXIT 9|1: Exit and restart Total Commander|8: Pass current left and right directory and file under cursor to new instance|https://www.ghisler.ch/board/viewtopic.php?p=446794#p446794
    
    0
    -1
Post Reply