Skip to content

Text File Write

The TextFileWrite function will save some content to a text file.


The full path to the file you wish to write to (i.e., c:\temp\filename.txt).

You can also set this property to the FileHandle of a FileOpen function when its ‘Is text’ option is checked.

The text to be written to the file.

You can enter some text directly into this property, or you can reference a string type or anything else from your function that can be converted to a string.

The encoding type to use when writing to the file.

Options:

  • Default
  • ANSI
  • ASCII
  • EBCDIC
  • Mac
  • OEM
  • Unicode
  • UTF8

The ‘Default’ option is the encoding used in your operating system.

Specify what to do if the output file does not exist.

Options:

  • Create file
  • Throw exception

What to do if the file already exists:

  • Append data: will find the end of the file and add the data there.
  • Increment file name: will add a number to the filename to make that name unique. This is a sequential number starting with 1.
  • Overwrite file: will replace all content in the file with the new content.
  • Throw exception: will stop the function’s processing and return an error.

TextFileWrite contains the file path of the file that has been written to.


Wikipedia: Code page

Joel on Character Sets

Go Global Developer Center: Code pages