filewrite( <"filename"> )

Description

This opens the specified file. You can only have one file open at any given time.

If the file exists, it is erased and a new blank file created in its place. If the file does not exist, it is created.

This has the same behaviour as BASIC's OPENOUT command (OS_Find &8x); or in C, the "w" options to fopen().

If you want to update an existing file, appending to previous contents, refer to fileupdate().

If a file is already open, an error will be generated and script processing terminated.

Specifics

Please remember that paths are completely different under Windows and RISC OS.