Re: The Save command will replace, without asking
Re: The Save command will replace, without asking
- Subject: Re: The Save command will replace, without asking
- From: "Gary (Lists)" <email@hidden>
- Date: Sat, 08 Oct 2005 10:11:14 -0400
"Dave Lyons" wrote:
RE: Looping through 'every item of' a folder in the Finder.
> However, this method [^] of checking file existence can be slow, if there
> are a large number of items in the folder (because Finder must build
> & return a list of the names of all the items). Here's another way,
> using "exists":
>
> tell application "Finder"
> if item myfilename of folder targetfolder exists then ...
> end tell
[Firstly, and OT, thanks for moving your posts to the bottom, Dave. ;) ]
Despite my deep affection for the Finder, the 'exists' method has a high
rate of failure for me.
Here's a third (and fast) option which seems to be a common practice among
AS programmers:
try
alias theThing
on error
-- theThing doesn't exist
end try
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden