append

Appends an output file to the end of a specified file.

Syntax

append str_expr

Input

str_expr
The path and file name to which the output is appended.

Example

Template:
{'Create a file containing today's date}
{append "date.fil"}
 {date()}
{close}
 
{file_name = "time_stamp.out"}
{append file_name}
 {date(%A)} : {time()}
{close}

Comments

When Templex processes a template file, output is sent to either stdout or a file specified in the command line. Output can be redirected to a file using the open statement. If the output is closed, it is then sent to either the next remaining open output file or the file specified on the command line if all other output files are closed.

append does not discard existing file contents. Text written to the file is added to the end of the file.