Re: open for access error
Re: open for access error
- Subject: Re: open for access error
- From: Matt <email@hidden>
- Date: Sun, 10 Feb 2002 17:45:08 -0500 (EST)
I'm trying that, but I need to concatenate a path (folder) to the file to
write, so maybe a better question would be:
How do I write a file that doesn't exist to a known path and have it be
created. I'm thinking the following is the general idea:
set theDir to alias (path to desktop as string)
set theFile to "newfile.txt"
set fref to (open for access (theDir & theFile) with write permission)
close fref
...but it keeps saying it "can not make [it] into an item."
Even the basic sample from Nutshell won't work and gives the above error:
set fref to (open for access (path to desktop as string) & "test.txt")
close fref
Thanks,
-Matt
On Sun, 10 Feb 2002, hcir wrote:
>
something on the order of this should work
>
>
set fref to open for access file "text.txt" with write permission
>
close access fref
>
>
>
> Quick question:
>
> (Mac OS 9.1)
>
> "open for access" is supposed to create the file if it does not exist,
>
> yes? Nutshell says so, but I keep getting an error that it does not
>
> exist...
>
> Just wondering if this is another 9.2.1-only issue or similar
>
> Nutshell-only faux pas.
>
>
>
- hcir
>
email@hidden
>
>
Matthew Kozak
Rutgers University-Camden
email@hidden
**************************************************************************
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -Ben Franklin
**************************************************************************
_______________________________________________
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.