• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: If exists logic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >If exists logic (From: Jeff Grossman <email@hidden>)

  • Prev by Date: Re: Do Perl Script?
  • Next by Date: Re: If exists logic
  • Previous by thread: If exists logic
  • Next by thread: Re: If exists logic
  • Index(es):
    • Date
    • Thread