Skip to main content
Version: 16

WRITE_FILE

Writes an output to the currently open text file.

Description

Writes an output to the currently open text file. In case the text file is not empty to begin with, outputs are written after the existing content of the text file, into the first available empty row. Subsequent WRITE_FILE commands will save outputs into separate rows within the text file.

This command works only if a text file was previously opened with the OPEN_FILE command, and takes effect only when the text file is closed with the CLOSE_FILE command.

Syntax

WRITE_FILE [Output]

Command parameters

Command parameterAssignmentValue formatInput options
OutputRequiredStringLocal, variable

Output:

Output value that will be written into the specified text file.

Sample code

Command only:

WRITE_FILE 12345

With added open, close and variable definition:

$Output=12345

OPEN_FILE c:\Temp\Sample.txt

WRITE_FILE $Output

CLOSE_FILE