{"id":11223,"date":"2011-03-15T07:00:00","date_gmt":"2011-03-15T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/03\/15\/why-cant-explorer-decide-what-size-a-file-is\/"},"modified":"2011-03-15T07:00:00","modified_gmt":"2011-03-15T07:00:00","slug":"why-cant-explorer-decide-what-size-a-file-is","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110315-00\/?p=11223","title":{"rendered":"Why can&#039;t Explorer decide what size a file is?"},"content":{"rendered":"<p>If you open Explorer and highlight a file whose size is a few kilobytes, you can find some file sizes where the Explorer <i>Size<\/i> column shows a size different from the value shown in the Details pane. What&#8217;s the deal? Why can&#8217;t Explorer decide what size a file is?\n The two displays use different algorithms.\n The values in the <i>Size<\/i> column are always given in kilobytes, regardless of the actual file size. File is 15 bytes? Show it in kilobytes. File is 2 gigabytes? Show it in kilobytes.\n The value shown in the <i>Size<\/i> column is rounded up to the nearest kilobyte. Your 15-byte file shows up as 1<a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2009\/06\/11\/9725386.aspx\">KB<\/a>. This has been the behavior since Explorer was first introduced back in Windows&nbsp;95, Why? I don&#8217;t know; the reasons may have been lost to the mists of time. Though I suspect one of the reasons is that you don&#8217;t want a file to show up as 0KB unless it really is an empty file.\n On the other hand, the value shown in the Details pane uses adaptive units: For a tiny file, it&#8217;ll show bytes, but for a large file, it&#8217;ll show megabytes or gigabytes or whatever. And the value is shown to three significant digits.\n The result is that a file which is, say, 19465 bytes in size (19.0088 kilobytes) shows up in the <i>Size<\/i> column as <i>20KB<\/i>, since the <i>Size<\/i> column rounds up. On the other hand, the Details pane shows <i>19.0KB<\/i> since it displays the value to three significant digits.<\/p>\n<p> It looks like Explorer can&#8217;t make up its mind, and perhaps it can&#8217;t, but the reason is that the two places on the screen which show the size round in different ways. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you open Explorer and highlight a file whose size is a few kilobytes, you can find some file sizes where the Explorer Size column shows a size different from the value shown in the Details pane. What&#8217;s the deal? Why can&#8217;t Explorer decide what size a file is? The two displays use different algorithms. [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-11223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>If you open Explorer and highlight a file whose size is a few kilobytes, you can find some file sizes where the Explorer Size column shows a size different from the value shown in the Details pane. What&#8217;s the deal? Why can&#8217;t Explorer decide what size a file is? The two displays use different algorithms. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=11223"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11223\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=11223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=11223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=11223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}