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: 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.