Re: If exists logic
Re: If exists logic
- Subject: Re: If exists logic
- From: Gary Lists <email@hidden>
- Date: Fri, 06 Jun 2003 12:32:51 -0400
On or about 6/5/03 5:49 PM, Jeff Grossman wrote:
>
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.
"it" is the <<script>> so it probably wouldn't. Tell the Finder.
Also, I notice that in the (file "..." you do not have an underscore in the
folder name. Perhaps a typo when offering the sample.
But, I think the problem is that you need to tell Finder to see if the file
exists.
This works for me:
tell application "Finder"
if exists file "My iMac:desktop folder:untitled 16" then "true"
end tell
--> "true"
--
Gary
OMM: OS9.1.2 / osa:AS 1.8.3 / osa:JS 1.0.3
"9 is Fine"
Please reply directly to the list.
Incoming messages are auto-deleted. (It's anti-spam, that's all.)
_______________________________________________
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.