UiPath Activities

The UiPath Activities Guide

Write Text File

UiPath.Core.Activities.WriteTextFile

Description

Writes the specified text into a file. If the file already exists, the pre-existing text is overwritten. If the file does not exist, it is created.

Properties

File

  • FileName - The path of the file to write to.
  • Encoding - The encoding type to be used. You can find the complete list of codes for each character encoding here. To specify the encoding type to be used, use the value from the Name field. If no encoding type is specified, the activity will search for the file's Byte Order Marks to detect the encoding. If no Byte Order Marks are detected, the system ANSI code page is selected by default. This field supports String variables.

Input

  • Text - The text to be written into the file. Supports only strings and String variables.

Common

  • DisplayName - The display name of the activity.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

UiPath.Core.Activities.WriteTextFile

Description

Writes the specified text into a file. The pre-existing text is overwritten.

To learn how to use this activity, see Tutorial: Working with Files and Folders.

Configuring the Activity

In the Body of the Activity

  • Text - Click Plus plus button on the right side of the field and then, from the menu, choose one of the available options to indicate the text to add:
    • Text from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell, or indicate a field from a selected email in Outlook that contains the text.
    • Use Saved Value - Select text output from another activity that you previously saved for later use in the project.
    • Text - Enter text in the Text Builder.
    • Ask when run - Prompt for a text when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
  • Write to filename - Click Browse browse files next to the field and then browse to and select the file where to add the text. To create a new file when the automation is executed, browse to the folder where to create it and enter the file name. Alternatively, you can click Plus plus button on the right side of the field and then, from the menu, choose one of the available options to indicate the file:
    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains a file path, or indicate a field from a selected email in Outlook that contains a file path.
    • Use Saved Value - Select a value in the form of a file path that you previously saved for later use in the project.
    • Text - Enter a file path in the Text Builder.
    • Ask when run - Prompt for a file path when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.

In the Properties Panel

Common

  • DisplayName - The display name of the activity.

File

  • Encoding - The encoding type to be used. You can find the complete list of codes for each character encoding here. To specify the encoding, enter the value from the Name column. If no encoding type is specified, the activity will search for the file's Byte Order Marks to detect the encoding. If no Byte Order Marks are detected, the system ANSI code page is selected by default.
  • FileName - See Write to filename in the body of the activity.

Input

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Updated 2 months ago


Write Text File


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.