We Use Cookies

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with this.

See our cookie policy.

Write data to a text file or read an existing text file and assign the content to a variable.

Built-In Action

Writes data to any text file and/or reads the contents of the file into a variable.

The File Path must contain a path & filename of the text file to write to/read from.


On the Write To File tab you can define the text that you want to write to the file. The file will be created if it does not already exist. All directories contained in the path will be created if they do not exist.

Select the file Format. This can be ASCII, Unicode or UTF-8 (default).

Select the Line Terminator that will be appended to the text written to the file.

Enter the Content that you want to write to the file. This can contain %variable% replacements.

If the Append To File option is enabled then the new text will be added to the end of any existing text file.

If the Make Backup option is enabled the existing file will be copied to the same file name with a .BAK file first.

On the Read From File tab you can select a ThinkAutomation variable that you want to assign the text file contents to. The file will be read again after any text is written to it.

Reading Only

Select the Read From File tab and then select the %variable% to assign the text file contents to.

If nothing is specified in the Content entry then the file is only read.