• 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 error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: open for access error (From: hcir <email@hidden>)

  • Prev by Date: shell script with top "can't get terminal attributes"?
  • Next by Date: Re: shell script with top "can't get terminal attributes"?
  • Previous by thread: Re: open for access error
  • Next by thread: Re: open for access error
  • Index(es):
    • Date
    • Thread