Write File
Use the Write File activity to write a file to a remote Unix/Linux target. The output of this activity includes the contents of the file written, the file’s name, and its path.
This activity does not return a file that you can use with other activities such as Upload File. It returns the contents of the file as a string.
Usage
Complete the following properties to use this activity:
- Unix/Linux - Specify the following information or click the Variable Reference icon to choose a variable:
- Local File Name - Enter the name of the file to write to the remote system. This can either be a relative path based on the user’s home directory (filename.txt) or an absolute path (/etc/something/filename.txt).
- Content - Enter the content to write to the remote target.
- Encoding - Click the drop-down list and choose the type of encoding to use for the file content. The available options are: ASCII, UTF-7, UTF-8, UTF-16, and UTF-32.
- Options - Click the drop-down list and choose write option for files that already exist on the target. The available options are: Append to existing file, Overwrite existing file, and Do not overwrite if file exists.
The following is an example of writing a simple HTML file to /var/www/html/index.html: