• 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
How to detect if a file exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to detect if a file exists


  • Subject: How to detect if a file exists
  • From: Andrew P <email@hidden>
  • Date: Fri, 17 Jul 2009 18:10:32 -0500

This is really, really simple.

I'm using an exists command to tell me if a document exists, and for some reason it wont work. Here's the script:

if "/Users/Andrew/Desktop/Stencil.doc" exists then (display dialog "Hello world")

So far even if it isn't inside the file path (for example, in another folder), it still says the file exists there and shows the Hello World dialog...

Maybe its just a small mistake because I'm tired, but I just can't seem to  get this right. Thanks!
-----------

I distrust morning people, largely because I suspect them of getting together early one day while the rest of us were asleep and setting up the rules of civilization. Also, I hate mornings.

  - Firewolf34
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to detect if a file exists
      • From: "Stockly, Ed" <email@hidden>
  • Prev by Date: Re: open for access file
  • Next by Date: Re: open for access file
  • Previous by thread: Re: Read diacritics characters from file
  • Next by thread: Re: How to detect if a file exists
  • Index(es):
    • Date
    • Thread