Calculating _actual_ fileSizes on disk

Shao Sean shaosean at unitz.ca
Fri May 17 04:20:00 EDT 2002


> As an example, i have a folder that my stack reports back as 726,510,022
> bytes (this is correct).  divide that by 1024 and i get 709,482KB 
this is correct, but when you say

> or roughly 709.5MB.
you are just dividing by 1000 at this point.. if you were to further divide by 1024, you'd end up with a number close to amount returned by the finder

(726,510,022 /1024) /1024 = 692.8539485931396484375

[as returned by the calculator in windows]


> Finder shows that those files actually use 693.6MB on the 120GB
> HFS+ disk, and toast shows that the files will need 684.4MB on a 700MB "Mac
> OS Extended and PC (Hybrid)" disk.
these differences could be due to the file systems used on the medias (HFS+ on the HD and CDFS or something else on the CD)

  
> I assume the discrepencies are all due to the block allocation differences
> between the different sized devices.  I _don't_ want to create a 700MB HD
on a 120GB drive, you're worried about 700MB? i'm not even worried about that on my little 30GB one.. ;-)


> there some way of determining how much space a file (or series of files in
> this case) on a large storage device will actually use on a smaller storage
this would probably required you knowing about blocks and clusters and other geeky drive related items.. =)


>  --HangTime [Will Compute for Food]  B-)>
nice ^_^



More information about the use-livecode mailing list