activities
latest
false
UiPath logo, featuring letters U and I in white

Workflow Activities

Last updated Dec 20, 2024

WriteTextFile

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.

Definition

Namespace: UiPath.Activities.System.API

Assembly: UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

Overloads

  
WriteTextFile(String, ILocalResource)Writes the specified text into a file. If the file already exists, the pre-existing text is overwritten.
WriteTextFile(String, ILocalResource, String)Writes the specified text into a file. If the file already exists, the pre-existing text is overwritten. You can also choose the encoding name for decoding the file content.

WriteTextFile(String, ILocalResource)

Writes the specified text into a file. If the file already exists, the pre-existing text is overwritten.

void WriteTextFile(
	string text,
	ILocalResource file
)void WriteTextFile(
	string text,
	ILocalResource file
)
text String
The text to be written into the file.
file ILocalResource
The file to write to. You can choose to configure the file either as an IResource or Local File. If you choose to use a local file, you need to add just the file name and extension and make sure the file exists in the root of the project folder.

WriteTextFile(String, ILocalResource, String)

Writes the specified text into a file. If the file already exists, the pre-existing text is overwritten. You can also choose the encoding name for decoding the file content.

void WriteTextFile(
	string text,
	ILocalResource file,
	string encoding
)void WriteTextFile(
	string text,
	ILocalResource file,
	string encoding
)
text String
The text to be written into the file.
file ILocalResource
The file to write to. You can choose to configure the file either as an IResource or Local File. If you choose to use a local file, you need to add just the file name and extension and make sure the file exists in the root of the project folder.
encoding String
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.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.