Skip to content

File

Handling with files and their contents is extremely important for most automation scenarios. You can use the File actions to manage files, including reading and writing files, copying, moving, and deleting files.

Actions

Read

Read the contents of a text file.

  • File path: The full path of the text file to open. This value can be a file path or a variable.
  • Encoding: The encoding specified when reading the text file. Default is UTF-8.
  • Set content to the variable: Store the contents of the file to a variable.

Write

Write the contents to a text file.

  • File path: The full path of the text file to write. This value can be a file path or a variable.
  • Choose text to write: The text to write in the specified file. This value can be multi-line text or a variable.

Append To

Append the contents to a text file.

  • File path: The full path of the text file to append. This value can be a file path or a variable.
  • Choose text to append: The text to append in the specified file. This value can be multi-line text or a variable.

Get Name

Get the base name of a file.

  • Source file: The full path of the file. This value can be a file path or a variable.
  • Set file name to a variable: Store the base name text to a variable.

Create

Create an empty file.

  • File path: The destination folder for the created file. This value can be a folder path or a variable.
  • File name: The base name of the file.
  • Overwrite an existing file: Specifies whether to overwrite the existing file. If the file doesn't exist, this action automatically creates it.
  • Assign file path to a variable: Store the created file path to a variable.

Copy

Copy one file into a destination folder.

  • Source file path: The file to copy. This value can be a file path or a variable.
  • Destination folder path: The destination folder for the copied file. This value can be a folder path or a variable.
  • Overwrite an existing file: Specifies whether to overwrite the file with the same name that already exists in the destination folder.

Cut

Move one file into a destination folder.

  • Source file path: The file to move. This value can be a file path or a variable.
  • Destination folder path: The destination folder for the moved file. This value can be a folder path or a variable.
  • Overwrite an existing file: Specifies whether to overwrite the file with the same name that already exists in the destination folder.

Delete

Delete one file.

  • File path: The file to delete. This value can be a file path or a variable.