Re: Problem with tell application "Finder" get exists...
Re: Problem with tell application "Finder" get exists...
- Subject: Re: Problem with tell application "Finder" get exists...
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 18 Jan 2006 17:47:28 +0100
Le 18 janv. 2006, à 17:08, email@hidden a écrit :
Was wondering if anyone encountered the same problem...
I'm working with files in a photography studio, so the format of our
file names is always: shotName_001.tif. (name + _ + capture number +
file extension)
When I do a...
tell application "Finder" to get exists "shotName_001.tif"
the result is true.
But when I do...
tell application "Finder" to get exists "shotName_0001.tif" -- add an
extra 0 to the capture number
the result is also true. Even though the literal file name in the
Finder only has two zeros in the capture number.
Anyone have any ideas how I can get an accurate result? I need to get
a result of false for the second query.
Thanks.
Are you sure that you reproduced the exact code ?
When I run it under 10.3.9, I always got false which seems to be normal
because the object "shotName_0001.tif" is meaningless for the Finder.
As far as I know it must use the full pathname.
Running this one:
tell application "Finder" to get exists file "Macintosh
HD:Users:yvankoenig:Desktop:dp3.pdf"
tell application "Finder" to get exists file "Macintosh
HD:Users:yvankoenig:Desktop:dp03.pdf"
with the first file existing but the second one missing, I got:
tell application "Finder"
exists file "Macintosh HD:Users:yvankoenig:Desktop:dp3.pdf"
true
exists file "Macintosh HD:Users:yvankoenig:Desktop:dp03.pdf"
false
end tell
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden