FILEWRITE(<C filespec>, <C text>)
Writes a text file to disk.
Returns <expC> "DONE" if written successfully, otherwise error message.

Useful in transferring data between disk files and memo fields.

Does not search DOS or Clipper PATH for files.

* Write from memo field into disk file
USE File && close when no longer needed
<find appropriate record>
written = FILEWRITE("Textfile.txt", Memo_field)
IF written = "DONE"
? "File was successfully written"
ELSE
? written && error message
ENDIF

* Write from memory variable into disk file
written = FILEWRITE("Textfile.txt", memvar)
IF written = "DONE"
? "File was successfully written"
ELSE
? written && error message
ENDIF

Hazard
Overwrites an existing file having the specified <filespec>
without warning; all data in the existing file will be destroyed.


Placed in the Public Domain by Tom Rettig Assoc.