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

Check if a file exists fails


  • Subject: Check if a file exists fails
  • From: Bernhard Waldbrunner <email@hidden>
  • Date: Sat, 5 Jan 2008 23:23:50 +0100

Hello!

I'm working on a small Folder Action Script, whose second line looks like (exactly how I learned from the AppleScript Language Guide):
if (the file ":Index" exists) then


Running this script always results in an error which reads "Can't get file :Index."
Now, this file really doesn't exist because I can't run it as a Folder Action in order to test/debug the script. However, this shouldn't be an issue since this file doesn't have to exist.


So, I tried this:
if (POSIX file "Index" exists) then

And I get the error message "Can't make file ':Index' into type reference." Not really helpful ...

I also tested placing "exists" in front of everything as in "if (exists ...", same errors.

What am I missing, is this approach deprecated? I am running Mac OS X 10.5.1, AppleScript 2.0.

Thanks in advance,

Bernhard
_______________________________________________
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: Check if a file exists fails
      • From: Bastiaan Boertien <email@hidden>
    • Re: Check if a file exists fails
      • From: Axel Luttgens <email@hidden>
    • Re: Check if a file exists fails
      • From: Matthew Smith <email@hidden>
    • Re: Check if a file exists fails
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Scripting Mailbox Properties in Mail
  • Next by Date: Re: Check if a file exists fails
  • Previous by thread: Re: choose folder on Leopard
  • Next by thread: Re: Check if a file exists fails
  • Index(es):
    • Date
    • Thread