Click here to Skip to main content
15,905,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a folder (actually many) that give the wrong size in MB. Right clicking on a folder and selecting properties pops up a dialog that has the size listed as 11.5MB (12,163,992 bytes). Last I checked 12,163,992 bytes = 11.6MB. Why does windows report an inconsistent size.

I'm trying to understand what method windows uses that could give 11.5.
Thanks.
Posted

1 solution

Perhaps they do this:
TruncateToOneDecimal(TruncateToInt(12163992 / 1024) / 1024)

That gives 11.5. Or maybe they just truncate to the nearest 0.5 rather than the nearest 0.1.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900