Re: Open for access can't distinguish files differing only in their extension?
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.