Re: If exists logic
Re: If exists logic
- Subject: Re: If exists logic
- From: Andrew Oliver <email@hidden>
- Date: Fri, 06 Jun 2003 10:41:27 -0700
Apart from Michelle's comment regarding the reason for selecting the file
before deleting it, why bother checking if it exists at all?:
tell application "Finder"
try
delete file "Fishads Addresses" of folder "List Addresses" of disk "OSX"
on error
-- who cares? If it doesn't exist we're in the clear anyway
end try
end tell
Andrew
:)
On 6/5/03 2:49 PM, "Jeff Grossman" <email@hidden> wrote:
>
How do I get the following code to work on OS X 10.2.6?
>
>
if (file "OSX:List Addresses:Fishads Addresses") exists then
>
tell application "Finder"
>
select {file "Fishads Addresses" of folder "List_Addresses" of disk
>
"OSX"}
>
delete selection
>
end tell
>
end if
>
>
>
It does not seem to like my "if exists" line.
>
>
Thanks,
>
Jeff
_______________________________________________
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.