Size / Calculated Space calculated by TC differs from Windows Calculation

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Wojtek
Junior Member
Junior Member
Posts: 72
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *Wojtek »

Hello Everyone, I've got two questions.

1) I wonder how TC calculates the size of drives / folders / files because what Windows shows differs.
Example 1:
128 GB SanDisk USB Drive
TC: 590.864.238 b
Win10: 626.032.640 bytes

Example 2:
Crucial 1 TB SSD internal
TC: 931.934.778.562 b
Win10: 878.914.691.072

2) I know it's possible to let TC calculate occupied Space by pressing the [SPACEBAR] (by default), but how about the two other calculations:
Free Space and Total Available Space?
Is it somehow possible to calculate and display these?
They are displayed above the tabs, but how can I copy those calculated sizes?


I am asking this because I'd like to create an Excel Workbook with the calculated space of some drives and when I use the calculated data from TC (occupied space) and the calculated data from Windows (total drive space, available drive space) I will get wrong results since the calculations don't match.

Example: Calculation for folders F1, F2, and F3 on drive X
occupied space (TC) = 111.222.333 b
occupied space (Win) = 100.200.300 bytes
total space (Win) = 123.456.789 bytes

123.456.789 - 100.200.300 = 23.256.489 bytes
123.456.789 - 111.222.333 = 12.234.456 bytes
23.256.4849 - 12.234.456 = 11.022.033 bytes

Any help appreciated
Asus Maximus VIII Hero · Win10 Pro x64
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K

Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U

TC 11.03 32-bit #347308
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *Fla$her »

Wojtek wrote: 2024-09-01, 11:34 UTC They are displayed above the tabs, but how can I copy those calculated sizes?
You can use Textify or an analog.
You can apply a simple script like this and the ones above.
You can use Autorun (ControlSetMouseAction/SetHotkeyAction + ClipPut + SizeFormat + GetDriveSpace).
Wojtek wrote: 2024-09-01, 11:34 UTC the calculations don't match.
With /i=fake.ini too? Can you show it in the screenshots?
Overquoting is evil! 👎
User avatar
Wojtek
Junior Member
Junior Member
Posts: 72
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *Wojtek »

Here's a preview of my TC showing Drive C vs Windows Dialog showing Properties:
https://1drv.ms/i/s!AqriqoLzwEu5g6MReUZG-qYDrBhU7w?e=xu8jyn
I have highlighted some data, but as you can see some calculations don't match.

Is there any option other than "Textify" to copy the total/free space from TC?
Asus Maximus VIII Hero · Win10 Pro x64
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K

Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U

TC 11.03 32-bit #347308
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *Fla$her »

Wojtek wrote: 2024-09-01, 17:15 UTC I have highlighted some data, but as you can see some calculations don't match.
Both of these windows are system. I don't understand what you are comparing here? A few selected drive items with used space on the entire drive? What's the point of that? Even if you select everything, including hidden and system objects, it will not include MFT data, which you can only see with a special plugin.
Wojtek wrote: 2024-09-01, 17:15 UTC Is there any option other than "Textify" to copy the total/free space from TC?
Strange question. I gave 3 options above, not one.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16001
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *petermad »

I see all kind of different space info: https://tcmd.madsenworld.dk/diskspaces.png

I get different sizes depending on whether 'Everything' is enabled in TC or not'

I also get other sizes when running TC as Administrator https://tcmd.madsenworld.dk/diskspaces2.png

So administrator (in TC or via 'Everything') privileges increases the used space shown because more directories can be accessed.

Also there are changes from one minute to the next due to background disk activity.

I can even see different sizes for the same drive in left and right panel - if the drive is accessed at different times: https://tcmd.madsenworld.dk/diskspaces3.png

And off course having dirs on TC's Ignore list affects the results too - but should not change the total space available


you can put SizeStyle1000=1 in the [Configuration] section of your wincmd.ini files - then the sizes will be very close to what Windows propertries shows.

That is opposite to what the Help says:
Help wrote:SizeStyle1000=0 0: Use binary units: 1k=1024bytes, 1M=1024k, 1G=1024M, 1T=1024G
1: Use decimal units: 1k=1000bytes, 1M=1000k, 1G=1000M, 1T=1000G
Note: Doesn't affect "Properties" dialog, which is part of Windows and always uses binary units.
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: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *tuska »

petermad wrote: 2024-09-02, 00:02 UTC I get different sizes depending on whether 'Everything' is enabled in TC or not'
The main reason for this is that Everything takes hidden files into account by default.
Example: ‘descript.ion’ files for Total Commander comments (Ctrl+Z).

Other reasons may be the following:
- Everything Options - 1.5.0.1383a (x64) > View > Size default: ...
- Everything Options - 1.5.0.1383a (x64) > Indexes: Exclude
- Everything Options - 1.5.0.1383a (x64) > Indexes: NTFS > Include only: ...
- In Everything 1.5a there are also ‘ignore lists’ such as ‘Result omissions’ or ‘Temporary Result Omissions’.
- See also: Windows Hardlinks - "Everything will not detect deleted hard links."
  I would perform a "Force Rebuild" in this case (Everything Options > Indexes > Button "Force Rebuild").
User avatar
petermad
Power Member
Power Member
Posts: 16001
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *petermad »

The main reason for this is that Everything takes hidden files into account by default.
Example: ‘descript.ion’ files for Total Commander comments (Ctrl+Z).
If I press Space on my TC program folder, which has several hidden files I get the same size for the directory with and without 'Everything' enabled. I have always viewing of hidden/*system files enabled in TC

But if I run TC without elevated rights and go into C:\Users and press Shift+Alt+Enter to calculate dir space I get very different results with and without 'Everything' enabled in Configuration -> Operation.

Without 'Everything' I only get the size for the current user name, the Default dir and the Public dir
With 'Everything' I get the size for all the folders (except the LNK folders).

My 'Everything' is running as a service and therefore has elevated rights, hence 'sees' more files/folders than TC run without elevation.

None of the other reasons you mention for the 'Everything' settings apply to my setup - I haven't excluded, included only or ignored anything in 'Everything's settings
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: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *tuska »

Everything 1.5a
In a search query e.g. root: ... or ... d: files:, the following is displayed, for example,
in the following columns that you have set up yourself:

Code: Select all

Total Disk Size	......................................	  1.81 TiB   Storage capacity        (German: Speicherkapazität)
Used Disk Size .......................................	553.86 GiB   Occupied storage space  (German: Belegter Speicher)
Available Free Disk Size				  1.27 TiB   Free storage space      (German: Freier Speicher)
Size (Everything Options > View > Size format: Auto)      Bytes, Kibibytes (KiB), Mebibytes (MiB), Gibibytes (GiB), Tebibytes (TiB);
							             IEC 1024 bytes == 1KiB, JEDEC 1024 bytes == 1KB
Total Size ...........................................    Bytes
Examples of other search queries
Search Functions
  1. Search for the free disk space in bytes on the volume of the current file.
    root: available-free-disk-size:<10gb
  2. Search for files belonging to a volume with the specified free disk size in bytes.
    root: free-disk-size:<10gb
  3. Search for folders or files with no parent folder.
    root:
Indexing properties...
As a test, I have indexed the properties ‘Total Disk Size’, ‘Used Disk Size’ and ‘Available Free Disk Size’:
Everything Options - 1.5.0.1383a (x64) > Properties > Add... Property > Include only folders: C:\;D:\;G:\ ... [x] Fast Sort
and then noticed the following - Basis: RAM 32.0 GB (20.4 GB usable):

1. The RAM consumption has increased by ~3% (currently: 36%; installed RAM 32.0 GB (20.4 GB Physical storage space available))
    The RAM consumption should NOT exceed 50% of the available memory.
2. The file size has increased by ~28 MiB (28 993 750 Bytes) (currently: Everything.db 1 600 798 353 Bytes)

Since I do NOT need to index these properties, as I can display this data anyway by right-clicking on the drive
and clicking on ‘Properties’, I have excluded these properties from indexing again, i.e. removed them.

If these columns are displayed in Everything, indexing can still be detected in the background in Everything Options - 1.5a
in the ‘Properties’, e.g. Indexing: D: as Everything determines/updates the field contents. Indexing can take a very long time.
Indexing in the background for these columns only is terminated when the columns are hidden again, i.e. removed.
See also: ... Size formats & standards ... | - Size standard

An overview of the available columns [with field contents!] can be displayed as follows:
- Position the cursor on a file and select it
- Right-click on a column heading in Everything 1.5a and click on the menu item ‘Add Columns...’
  ‘Everything Properties’ is selected there by default
- Select Property > Search: size ... Enter as search term -> the display is filtered
- Right-click on a column heading and click on the ‘Preview’ menu item
- In the ‘Preview’ column that now also appears, you can now see which columns contain values
- You can also click on ‘Windows Property System’ to see if there are columns with values here as well.
  For ‘Size’, for example, there are the columns ‘Gesamtdateigröße <-> System.TotalFileSize’ or
  ‘Gesamtgröße <-> System.Software.NullPreview.TotalSize’. The name is already specified in the local language.

Please see also: Request: Number value exactness tolerance and approximation | Everything.ini /size_ceil_search=1

Everything - Drive D: (NTFS - Internal drive) | Everything Options 1.5a > Size standard: IEC | Everything.ini: size_ceil_search=1

Code: Select all

	  1.81 TiB	2 000 396 742 656  Bytes	Total Disk Size  (EV: 1.81 TiB; unit converter:  1 990 116 046 275 Bytes !)
      - 553.86 GiB	  594 703 978 496  Bytes	Used Disk Size   (553.8612403869629 GiB !)
      ------------      --------------------------	------------------------
          1.27 TiB      1 405 692 764 160  Bytes	Available Free Disk Size
      ============	==========================	========================
In the file properties for drive D: 553 GB, 1.27 TB and 1.81 TB are displayed.

Windows Explorer displays 1.81 TB and 1.27 TB for drive D:.

The following is displayed in Total Commander (Bytes) and correspond to file properties:

Code: Select all

	  1.27 TiB	1 405 692 764 160  Bytes	this corresponds to: 1.2784701213240623 TiB  (!)
	  1.81 TiB	2 000 396 742 656  Bytes	this corresponds to: 1.8193502388894558 TiB  (!)
A further detailed test to determine the differences in file sizes between Total Commander, Windows Explorer and Everything 1.5a
is too time-consuming for me personally. In my opinion, the key points for such a test have already been addressed
in various posts on this topic anyway. Furthermore, some serious differences can also be seen in the CODE examples.

SUMMARY

Code: Select all

TiB		     GiB		  Bytes		      Column names     Everything   TC       Explorer  File properties
---------------------------------------------------------------------------------------------------------------------------------
1.8193502388894558   1863.0146446228027	  2 000 396 742 656   Total Disk Size    1.81 TiB   Bytes    1.81 TB      1.81 TB + Bytes
0.5408801175653934    553.8612403869629	    594 703 978 496   Used Disk Size   553.86 GiB			553 GB    + Bytes
---------------------------------------------------------------------------------------------------------------------------------
1.2784701213240623   1309.1534042358398	  1 405 692 764 160   Av.FreeDiskSize    1.27 TiB   Bytes    1.27 TB      1.27 TB + Bytes
=================================================================================================================================
Remark:
Temporary Rounding difference in GiB (0,01) - regarding field contents as SHOWN in Everything 1.5a - found in another example (drive C:).
If the columns are displayed, they are updated continuously...


>>> Unit Converter (German) <<<
Last edited by tuska on 2024-09-05, 06:44 UTC, edited 2 times in total.
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *tuska »

2Wojtek
I would proceed as follows:
  1. DRIVES
    Take the number of bytes for ‘Used Disk Size’, ‘Available Free Disk Size’ and ‘Total Disk Size’
    from the properties (right-click on the drive...) and enter them in Excel.
    The number of bytes in Total Commander - displayed above the tabs -
    corresponds to the properties for ‘Available Free Disk Size’ and ‘Total Disk Size’.
     
  2. FOLDER
    Take the number of bytes for ‘Size on disk:’ (‘Größe auf Datenträger’)
    from the properties (‘Alt+Enter’ or right-click on the folder...) and enter them in Excel.
    Alternatively, you can select a different value, which is displayed after
    ‘CTRL+L Calculate occupied space (of the selected files)’,
    e.g. "Total space occupied" which corresponds to Size’ (‘Größe’) field in the properties.
    ‘Alt+Enter’ or ‘CTRL+L’ is also useful for determining the size in bytes of several selected folders.

    In Windows Explorer, the value is displayed for a folder, e.g. in GB,
    which is entered in the properties for the folder in GB and bytes
    in the Size’ (‘Größe’) field.
In my opinion, this approach - based on the number of bytes - avoids rounding differences.


Windows 11 Pro (x64) Version 23H2 (OS Build 22631.4112) | TC 11.03 x64
Capture Text: Tool 'Textify' | Tool 'TextGrab' | FastStone Capture
User avatar
Wojtek
Junior Member
Junior Member
Posts: 72
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *Wojtek »

tuska wrote: 2024-09-04, 22:50 UTC...
petermad wrote: 2024-09-02, 21:51 UTC...
Many thanks to both of you.

I have tried TreeSize (https://www.jam-software.com/treesize/editions.shtml) which is very good for deep analysis.

But what I am trying to do now is actually some housekeeping. I have about 6 fixed HDDs (internal and external) which I always use with different sizes.
Right now all my data is spread across all drives and I need to do some calculations to manage and distribute my data so it fits on the various drives.

In my Excel WB there will be the total amount of data (by category like music, photos, movies, documents) and the total available storage of a drive so I can decide where I will finally put it.
The reason for this was a data loss due to hardware failure. Luckily I could restore most of it but with huge loss of information (like filenames).

So therefore I don't need continuous analysis, just a few sizes to work with.
for that I simply press [SPACE] on the desired files/folders.

Once my data is sorted and distributed I can proceed to step 2: identify, compare, rename, etc.

After data loss I was left with hundreds of thousands of files stripped of their actual filename and left with nothing but an index.


Should I start a new thread for this?
Asus Maximus VIII Hero · Win10 Pro x64
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K

Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U

TC 11.03 32-bit #347308
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Size / Calculated Space calculated by TC differs from Windows Calculation

Post by *tuska »

Wojtek wrote: 2024-09-05, 23:28 UTC Should I start a new thread for this?
Yes, please.
Post Reply