Skip to content

Write File

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

Writes a text string to a file. If the file does not exist, it creates it; if it exists, it replaces it by default. Use it to generate output files: a log, a text report, a configuration file.

Write the content to the path file. By default it overwrites the existing file (overwrite = true). If you put overwrite = false and the file already exists, the activity fails instead of replacing it.

ParameterEditorDescription
pathexpressionPath of the file to write.
contentexpressionThe text to write.
ParameterEditorDescription
encodingtextFile encoding. By default "utf-8".
overwritebooleanReplace if it already exists. By default true.

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

Write File path = = "C:/salida/resultado.txt" content = = "Proceso completado: " + now().ToString("yyyy-MM-dd HH:mm")