Comparing filenames based on case sensitive filepaths

Terry Judd tsj at unimelb.edu.au
Tue Mar 8 23:44:55 EST 2011


On 9/03/11 3:07 PM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:

> On 3/8/11 4:37 PM, Terry Judd wrote:
>> Due to an obscure but annoying issue with OSX 10.5 I need to be able to
>> check for the existence of a file based on the case of its name before I can
>> launch it from Livecode. The exists function isn¹t case sensitive and the
>> only idea I¹ve been able to come up with to date is to use the files
>> function, filter the results based on the filename and then compare the two
>> filenames (having set the caseSensitive property to true). This seems a bit
>> long winded and I was hoping for a simpler and quicker way.
> 
> The Mac isn't case-sensitive, and it won't let you duplicate names
> regardless of their case. I'm curious why you'd need to distinguish by that.

It's because of a weird glitch on OSX 10.5. If you have an old-style (non
bundle) Mac app that is named the same (case sensitive) as its parent folder
then you cant launch it other than by double-clicking its icon (shell,
Livecode and Applescript launch methods all fail). Change the case of one
character in either the folder or the filename and you can launch it any old
way.

I bumped into this because I had a stack of old Director apps sitting inside
identically named folders that I was trying to launch from a Livecode
'software browser'. Worked fine on 10.6, failed dismally on 10.5. Still not
sure how I managed to isolate the problem (inspired guesswork?).

Terry...

> 
> I can't think of any other way to compare case than what you've come up
> with though.

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne






More information about the use-livecode mailing list