• 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: Open for access can't distinguish files differing only in their extension?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open for access can't distinguish files differing only in their extension?


  • Subject: Re: Open for access can't distinguish files differing only in their extension?
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 21 Apr 2003 18:44:55 -0700

On 4/21/03 5:50 PM, "Timothy Bates" <email@hidden> wrote:

> I have two files on the desktop:
> irrA_spelling_data.txt
> irrA_spelling_data.mxo
>
> I try and open the txt file
>
> set fPath to "Vortex:Users:tim:Desktop:irrA_spelling_data.txt"
> set f to open for access fPath
>
> -->Duplicate file name. Vortex:Users:tim:Desktop:irrA_spelling_data.txt
>
> That shouldn't be happening: obviously there isn't a duplicate file, it is
> just that open for access is failing to distinguish the two files? Anyone
> got a work-around for this?

set f to open for access alias fPath

will open the existing file. You're asking it to open a file path without
specifying 'alias' or 'file': it seems to think you want the string coerced
to a new file of the same name. But 'open for access' doesn't do coercions
from string anyway.

--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Open for access can't distinguish files differing only in their extension? (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: Open for access can't distinguish files differing only in their extension?
  • Next by Date: Re: save any script as an application
  • Previous by thread: Re: Open for access can't distinguish files differing only in their extension?
  • Next by thread: Re: Open for access can't distinguish files differing only in their extension?
  • Index(es):
    • Date
    • Thread