Skip to content

Append to File

Type: append-file  ·  Package: Filesystem Activities v1.0.0  ·  Output: string

Adds text to the end of a file, without deleting what you already have. If the file does not exist, it creates it. It is the ideal activity to build logs or accumulate lines throughout an execution (or several).

Add the content to the end of the path file. By default it prepends a line break (newLine = true), so that each call is on its own line.

ParameterEditorDescription
pathexpressionFile path.
contentexpressionThe text to add.
ParameterEditorDescription
encodingtextFile encoding. By default "utf-8".
newLinebooleanAdd a line break before the content. By default true.

Returns the path of the file, in case you want to capture it into an output variable.

Record each processed element in a log file:

For Each items = = facturas itemVariable = factura
└─ activities:
... procesar ...
Append to File path = "C:/logs/procesadas.txt" content = = factura.numero + " — OK"
  • Write File — create or replace the entire file.
  • Read File — read the accumulated content.