Re: Determing the Size of a File
Re: Determing the Size of a File
- Subject: Re: Determing the Size of a File
- From: David Blache <email@hidden>
- Date: Thu, 03 May 2001 07:17:25 -0500
on 5/2/2001 8:36 PM, Michelle Steiner at email@hidden wrote:
>
On 5/2/01 4:46 PM, Scott Earleywine <email@hidden> wrote:
>
>
> Is there a way to make this a droplet?
>
>
>
> I pasted the code, but when I run it...the file I had selected (obviously)
>
> deselects and the script 'checks' the compiled script's size.
>
>
This script will give you the size of each file or folder dragged onto
>
the droplet. (Be careful of dropping folders; it can take a very long
>
time to calculate the size of large folders.)
>
>
--Michelle
>
>
on open (itemList)
>
repeat with testItem in itemList
>
set {isfolder, fileSize, itemName} to {folder, size, name} of (info for
>
testItem)
(snip)
Folks,
When you advise people to use "info for" to obtain the size of folders, it
might be good to note that "info for" was broken for quite a long time (and
may still be broken) in that it fails if you try to use it on a folder
larger than 2 GB.
JR