Re: read write basics
Re: read write basics
- Subject: Re: read write basics
- From: Guy Parker <email@hidden>
- Date: Thu, 05 Jul 2001 11:47:53 +0100
Looks to me like you just need to use the "open for access" command...
open for access file "myhd:desktop folder:new source" with write permission
copy (choose file) to _source
read _source as list using delimiter space
write result to file "myhd:desktop folder:new source"
close access file "myhd:desktop folder:new source"
"Open for access" will create the specified file if it doesn't already
exist.
You might also find this useful later:
set DesktopPath to path to desktop as string
open for access file (DesktopPath & "new source") with write permission
Guy
>
hi list
>
>
at a loss as to how to write a text file, just trying to get my i/o
>
framework going on a newbie script i'm throwing together
>
>
here's what i have so far, and i always end up with an 'execution error'
>
that the file i'm trying to write "wasn't found"
>
>
i expect there is some command that i need prior to writing the file, and
>
when i try 'create file . . . ' i get a 'syntax error' 'expected end of
>
line, etc. but found class name' (so it's a bad command i suppose), anyway:
>
>
copy (choose file) to _source
>
>
read _source as list using delimiter space
>
>
write result to file "myhd:desktop folder:new source"
>
>
thanks,