Append to File
Append to File
Section titled “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).
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | File path. |
content | expression | The text to add. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
encoding | text | File encoding. By default "utf-8". |
newLine | boolean | Add a line break before the content. By default true. |
Output
Section titled “Output”Returns the path of the file, in case you want to capture it into an output variable.
Example
Section titled “Example”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"Related activities
Section titled “Related activities”- Write File — create or replace the entire file.
- Read File — read the accumulated content.