Writing to an existing file
Writing to an existing file
- Subject: Writing to an existing file
- From: Steve Roy <email@hidden>
- Date: Fri, 12 Sep 2003 11:30:15 -0400
I'm puzzled. I can't write a script that opens an existing file for writing
anymore. I might be forgetting how to do it?
The script below works the first time you run it, but subsequent times generates
an error "Duplicate file name. Beauty:Users:steve:Desktop:Test.txt".
set theFilePath to (path to desktop as string) & "Test.txt"
set theFileRef to open for access theFilePath with write permission
write "Hello!" to theFileRef
close access theFileRef
Why won't it let me open the file?
Steve
--
Steve Roy <email@hidden>
Personal homepage: <
http://homepage.mac.com/sroy>
Projects homepage: <
http://www.roydesign.net>
_______________________________________________
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.