Check if a file exists fails
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