Show same file size as Windows Explorer?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jimosity
Junior Member
Junior Member
Posts: 8
Joined: 2014-04-28, 14:44 UTC

Show same file size as Windows Explorer?

Post by *jimosity »

I know there are other threads about file size display and such but haven't found exactly what I need.

For instance:
In Windows Explorer; a file size is shown as 10kb
In Total Commander; it's shown as 9kb

The file properties show as "9.06 KB (9,286 bytes)" and the 'size on disk' is shown as "12.0 KB (12,288 bytes)"


Regardless of what is right or wrong; what I want to see is the same size that Windows Explorer shows.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Regardless of what is right or wrong; what I want to see is the same size that Windows Explorer shows.
No, thank you. I want to see the correct file size (or at least the best matching one in terms of math).

If you don't care about right or wrong ... just ignore it.
#5767 Personal license
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Show same file size as Windows Explorer?

Post by *HolgerK »

jimosity wrote:In Windows Explorer; a file size is shown as 10kb
Explorer itself is inconsistent in showing file sizes.
E.g. if you focus the file and activate the details pane or show a tool tip hovering the file you will see 9.06 KB.
So what's your point?
Make TC inaccurate like explorer and follow a buggy behavior of Explorer introduced with Win 95?
(see: Why can’t Explorer decide what size a file is? )
BTW: First version of Windows Commander was seen in 1993!

Regards
Holger
Make our planet great again
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Show same file size as Windows Explorer?

Post by *nsp »

jimosity wrote:I know there are other threads about file size display and such but haven't found exactly what I need.

For instance:
In Windows Explorer; a file size is shown as 10kb
In Total Commander; it's shown as 9kb

The file properties show as "9.06 KB (9,286 bytes)" and the 'size on disk' is shown as "12.0 KB (12,288 bytes)"


Regardless of what is right or wrong; what I want to see is the same size that Windows Explorer shows.
A lot of TC user are happy with size being more accurate inside TC than explorer. If you really need to see exact same size as explorer, you will have to mimic approximate explorer behavior into a content plugin and use a custom column.

I do not know if shell details have or can expose such buggy result....

If you do not care about what is exact, thrust TC. If you do not care at all just remove size column !
jimosity
Junior Member
Junior Member
Posts: 8
Joined: 2014-04-28, 14:44 UTC

Post by *jimosity »

I understand the logic of right and wrong and all of that...still, I would like to see the value the same as represented in Windows Explorer.

See; I have to do a quick visual comparison of file timestamps and sizes -- the information is provided to me thru tickets based on what requesters see in Windows Explorer (I'm sure that I can't get a fortune 100 company to deploy Total Commander out to all users and get them to actually start using it because it does a more accurate file size listing).

They provide info like this:

ActuarialDM_FactPolicyFundBucketSnapshotLoad 5/18/2017 7.51 AM 1,121 KB
BalanceFANNtoActuarialDM_PolicyCounts.dtsx 6/12/17 3:29 PM 257 Kb
BalanceNHICtoActuarialDM_PolicyCounts.dtsx 6/12/17 3:35 PM 257 Kb

...etc..sometimes it may be hundreds of files...

They are getting the size info right out of what they see in Explorer.
Since I use Total Commander personally; I'd like to be able to see the same size they are seeing so I can approve or deny their request.
As it stands, I have to use Windows Explorer because Total Commander is too accurate. :|
Yes, I know...I know...I would rather the world use Total Commander and see a more accurate size as well...but it's just not going to happen in my specific scenario.

So...with that being said; Total Commander can't do it?
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

2jimosity

I you use a TC version before 9.0 (e.g. 8.52) you can utilize this plugin http://totalcmd.net/plugring/WinScriptAdv.html
to create a custom column with explorer rounded size display.
1. Download and install the plugin
2. Locate the plugin directory and modify options.ini

Code: Select all

[Script] 
ActiveScripts=ExplorerKBRounding
[ExplorerKBRounding]
; File Size with explorer rounding in kB 

Script=ExplorerKBRounding.vbs
content=Size in KB
extensions=*
FoldersPaths=0
3. Create a file <F4> with the name ExplorerKBRounding.vbs in the sub folder scripts and paste the following code into this file

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
4. Create a custom column view and select from plugins [=winscriptsadv.Size in KB] KB
5. Add additional columns like [=tc.writedate] as you need

Unfortunately this plugin does not work together with TC 9.0 (the custom column configuration dialog of TC seems to crash the plugin while extracting a preview value).

Regards
Holger
Make our planet great again
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2HolgerK

Plugin itself working fine, but you should write down fields manually
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
jimosity
Junior Member
Junior Member
Posts: 8
Joined: 2014-04-28, 14:44 UTC

Post by *jimosity »

HolgerK wrote:2jimosity

I you use a TC version before 9.0 (e.g. 8.52) you can utilize this plugin http://totalcmd.net/plugring/WinScriptAdv.html
to create a custom column with explorer rounded size display.
1. Download and install the plugin
2. Locate the plugin directory and modify options.ini

Code: Select all

[Script] 
ActiveScripts=ExplorerKBRounding
[ExplorerKBRounding]
; File Size with explorer rounding in kB 

Script=ExplorerKBRounding.vbs
content=Size in KB
extensions=*
FoldersPaths=0
3. Create a file <F4> with the name ExplorerKBRounding.vbs in the sub folder scripts and paste the following code into this file

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
4. Create a custom column view and select from plugins [=winscriptsadv.Size in KB] KB
5. Add additional columns like [=tc.writedate] as you need

Unfortunately this plugin does not work together with TC 9.0 (the custom column configuration dialog of TC seems to crash the plugin while extracting a preview value).

Regards
Holger
This works great! Thank you!!
bbkudk
New Member
New Member
Posts: 1
Joined: 2018-06-13, 17:03 UTC

It is working in 9.12 x64

Post by *bbkudk »

Thanks it is working in 9.12 x64.
Post Reply