Re: Simple question.... writing to file
Re: Simple question.... writing to file
- Subject: Re: Simple question.... writing to file
- From: Bastiaan Boertien <email@hidden>
- Date: Thu, 10 Feb 2005 13:31:47 +0100
Hi Bernado,
If you use open for access then this can maybe help you
set theFile to (path to desktop folder) & "myTextFile.txt" as string
set theData to "the contents of the text file"
open for access file theFile with write permission
set eof file theFile to 0 -- the file is empty now
write theData to file theFile
close access file theFile
greetings bastiaan
Op 10-feb-05 om 13:13 heeft Bernardo Hoehl het volgende geschreven:
Hi List,
I think this is a simple one. But I can't figure out how.
I have to write a diferent content to an existing text file, and right now, what happens is that when the new content is shorter than the previous content, the tail of the old text remains in the file.
How do I "empty" the content of a text file before writing the new content?
Thanks!
Bernardo Höhl
Rio de Janeiro - Brazil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden