Re: Finder error problem?
Re: Finder error problem?
- Subject: Re: Finder error problem?
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 6 Dec 2010 09:31:57 -0500
On Mon, Dec 6, 2010 at 8:58 AM, Jim Brandt
<email@hidden> wrote:
Does Finder have a problem correctly identifying the existence of filenames with leading zeros, or is this an AS problem?
I can reproduce the problem here. I was briefly derailed by an oddity with POSIX paths(*), but that has nothing directly to do with your problem. It does appear that the Finder treats numeric strings of equivalent value as equal strings when comparing filenames.
Applescript does not, however, do so when resolving aliases. So you can always do this:
try
file file_name as alias
set found_first to true
on error
set found_first to false
end
--Mark
(*) Specifically, I noticed that (exists POSIX file "/path/to/file") works as expected, but if I replace the literal path string with a variable, it always returns false.
--
Mark J. Reed <
email@hidden>
_______________________________________________
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