Re: If folder does not exist ...
Re: If folder does not exist ...
- Subject: Re: If folder does not exist ...
- From: JollyRoger <email@hidden>
- Date: Tue, 11 Jun 2002 19:50:01 -0500
On 6/11/2002 6:56 PM, "Steven Angier" <email@hidden> wrote:
>
That's good, except that FileExists() might fail if you feed it an alias
>
instead of a path string. (A broken alias is still an alias.)
>
>
If you add a text coercion before the alias coercion, then feeding it a
>
broken alias will return the right result, thus:
>
>
on FileExists(someFile)
>
try
>
get (someFile as text) as alias
>
return true
>
on error
>
return false
>
end
>
end
Good catch, Steven! Thanks for pointing that out. = )
>
> In many cases, asking the Finder to do something is much, much slower than
>
> the alternative.
>
>
And often less reliable.
Yep.
JR
_______________________________________________
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.