Re: Writing to a file - overwriting contents
Re: Writing to a file - overwriting contents
- Subject: Re: Writing to a file - overwriting contents
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 02 Feb 2003 06:56:11 -0800
On 2/2/03 6:02 AM, "James Burns" <email@hidden> wrote:
>
>
Thanks to everyone for their help on my previous question(s). I've got
>
one more, probably a simple one...
>
>
What's the proper routine for writing to a file to insure overwriting
>
the contents? I've noticed that just using the write command seems to
>
start at the beginning of the file and writes for the length of
>
whatever you're writing. The problem is if your new length is shorter
>
than the old length.
>
>
Is there a common routine using the setoef command to properly
>
overwrite files?
set s to "very short text"
set f to open for access alias filePath with write permission
set eof f to 0
write s to f
close access f
--
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.