Why can't Explorer decide what size a file is?

Raymond Chen

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’s the deal? Why can’t Explorer decide what size a file is? The two displays use different algorithms. The values in the Size 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. The value shown in the Size column is rounded up to the nearest kilobyte. Your 15-byte file shows up as 1KB. This has been the behavior since Explorer was first introduced back in Windows 95, Why? I don’t know; the reasons may have been lost to the mists of time. Though I suspect one of the reasons is that you don’t want a file to show up as 0KB unless it really is an empty file. On the other hand, the value shown in the Details pane uses adaptive units: For a tiny file, it’ll show bytes, but for a large file, it’ll show megabytes or gigabytes or whatever. And the value is shown to three significant digits. The result is that a file which is, say, 19465 bytes in size (19.0088 kilobytes) shows up in the Size column as 20KB, since the Size column rounds up. On the other hand, the Details pane shows 19.0KB since it displays the value to three significant digits.

It looks like Explorer can’t make up its mind, and perhaps it can’t, but the reason is that the two places on the screen which show the size round in different ways.

0 comments

Discussion is closed.

Feedback usabilla icon