• 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: John Delacour <email@hidden>
  • Date: Tue, 22 Apr 2003 09:05:50 +0100
  • Mac-eudora-version: 6.0a16

At 10:50 am +1000 22/4/03, Timothy Bates 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

I don't see how this is possible unless you have severe problems with your system. When did you last run any sort of repair utility?


You should not open for access a pathname but a file specification or alias.

open for access : Open a disk file for the read and write commands
open for access file -- the file or alias to open for access. If the file does not exist, a new file is created

set pathname to "d:f:f"
set f to file pathname
-- or pathname as file specification or POSIX file pathname
open for access f

close access f

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?

None of this makes any sense. The read/write osax in Standard Additions is years old and has never in my experience misbehaved. Either you syntax is wrong or you need to repair your file system. Do a search for recent postings from me to the list containing 'open for access' for several examples.

JD
_______________________________________________
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: newbie question on simple finder actions
  • Next by Date: Change computer name
  • Previous by thread: Re: Open for access can't distinguish files differing only in their extension?
  • Next by thread: Re: save any script as an application
  • Index(es):
    • Date
    • Thread