--- title: "append to file()" slug: "basic-append-to-file" updated: 2026-08-17T08:43:09Z published: 2026-08-17T08:43:09Z canonical: "docs.lobstersoftware.com/basic-append-to-file" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # append to file() This function appends content **c** to file **a**, using encoding **b**. The return value of the function is **c**. ## Parameters | Parameter | Description | | --- | --- | | a | Name (and path) of the file. If the file does not exist, it will be created. | | b | (optional) The encoding. Default: "8859_1". **NOTE:** Use the three dots to select a value. | | c | Content to be appended. | ## Example We assume that the file does not exist yet and that the two calls happen one after the other. | Parameter a | Parameter b | Parameter c | Result | Content of file | | --- | --- | --- | --- | --- | | test | ./conf/append_test.txt | | test | test | | test | ./conf/append_test.txt | | test | testtest |