Re: folder size
Re: folder size
- Subject: Re: folder size
- From: Rob Jorgensen <email@hidden>
- Date: Thu, 2 Oct 2003 08:33:05 -0400
At 9:49 PM +1000 10/2/03, John Cochrane wrote:
Could someone please explain the following behavior to me.
The first time I run the script
tell application "Finder"
size of aFolder
end tell
It results in a missing value.
Subsequent runs give a correct numeric result unless I log out and
run the script again.
The same does not apply for
tell application "Finder"
size of aFile
end tell
which gets it right from the start.
Is there a way to get the first script to return a number the first
time. Enclosing it in a try block does not seem to help.
Try this. It uses Standard Additions and doesn't require the Finder.
Where Finder returns missing value and moves on, it appears that
Standard Additions waits until the size has been calculated before
proceeding. Large folders might require an extended timeout to allow
time for the size calculation.
size of (info for aFolder)
-- Rob
_______________________________________________
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.
References: | |
| >folder size (From: John Cochrane <email@hidden>) |