Re: Size with AS vs Size displayed in Finder: Why different?
Re: Size with AS vs Size displayed in Finder: Why different?
- Subject: Re: Size with AS vs Size displayed in Finder: Why different?
- From: Christopher Nebel <email@hidden>
- Date: Thu, 7 Feb 2002 14:33:11 -0800
On Thursday, February 7, 2002, at 11:10 AM, Mr Tea wrote:
The script I knocked up to give me this information more quickly (by
writing
it into each folder/file's comments field) seems to work OK, but the
sizes
it returns are different to those displayed by the Finder. Who should I
believe.
These are the kind of discrepancies I'm seeing:
Finder AppleScript
770 MB 766.58 MB
361.3 MB 353.85 MB
331.8 MB 330.16 MB
112.2 MB 112.25 MB
588 K 593.04 K
In most cases, the AS-calculated size was smaller. I thought I began to
see a pattern of greater discrepancies in the figures for folders with
numerous small files - which suggested that AS is totting up the actual
size of the contents, leaving out the unused section of any partially
used blocks (am I warm). But then why were some AS figures
actually higher than the Finder's calculations?
"Info for" returns the logical size of the item (i.e., how many bytes of
data are there), whereas the Finder usually reports the physical size
(i.e., how much space does it take up), so you were spot on there. If
you look in a Get Info window, you should see that "info for" agrees
with the "bytes" number, while the size column agrees with the "on disk"
number.
"Info for" will also include invisible files in its total, where the
Finder won't. (On Mac OS 9, anyway -- Finder X does.) "But I don't
make any invisible files!" you cry. Well, you probably didn't, but the
Finder does all the time -- whenever you create a custom folder icon,
attach a folder action, or adjust the width or ordering of the columns
in a list view, that information gets stored in an invisible file.
Enough of them will add up to a noticeable amount.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.