• 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
Re: Finder error problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Finder error problem? (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Finder error problem?
  • Next by Date: Re: Finder error problem?
  • Previous by thread: Re: Finder error problem?
  • Next by thread: Re: Finder error problem?
  • Index(es):
    • Date
    • Thread