MACSCRPT Archives

May 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 13 May 2008 10:55:50 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
I'm writing RSS files. When the file needs to be updated, I've been 
deleting the old version and writing new text to a new file. Seems 
like a lot of extra work. But if I write the new text to the old file 
"starting at 0" what happens if the old text is longer than the new?

I can write spaces to the file from 0 to eof, but then I might end up 
with a bunch of wasted space at the end.

Doing ACME Replace on the entire text also seems a bit extreme.

Is there a simple way to wipe the contents of the file without 
deleting and recreating?

I'm prepared to feel stupid if it turns out to be really obvious.
-- 

Bill Steele
[log in to unmask]

ATOM RSS1 RSS2