You can replace the existing contents of a text file by specifying the keyword destructive; for example:
response to ...
write destructive FirstDraft to file "STORE.TXT"
Here, the contents of the textual region FirstDraft replace the existing contents of the file STORE.TXT. If you specify a file that does not exist, ESL creates a new file, just as if you had not specified destructive or append. If for any reason the operating system does not let ESL delete the old contents of the file, then ESL will not perform the operation, an error message is generated, and the value of ioerror is set to true.