WRITE – This command writes information to a text file. One possible application for Write is to write a batch file on the fly that may be executed. The format is:

WRITE [R] FileName “stuff to write”;

- [R] - If the R argument is present, then existing contents of the file are deleted before the file is written. If R is not specified and the file exists, the file will be opened and appended.

- FileName is the name of the file that will be written.

- “stuff to write” is what will be written. To write the value of a variable, enclose it in square brackets ([…]).

an example:

WRITE R C:\MyStuff\DoIt.BAT SETALARM DIAMETER [DIAM];