Activities
latest
false
Banner background image
Workflow Activities
Last updated Apr 22, 2024

ReadTextFile

Reads all characters from a specified file and stores it in a String variable.

Definition

Namespace: UiPath.Activities.System.API

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

Overloads

  
ReadTextFile(IResource)Reads all characters from a specified file and stores it in a String variable.
ReadTextFile(IResource, String)Reads all characters from a specified file, while detecting the encoding, and stores it in a String variable.

ReadTextFile(IResource)

Reads all characters from a specified file and stores it in a String variable.
string ReadTextFile(
	IResource file,
)string ReadTextFile(
	IResource file,
)
file IResource
The file to be read. 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.

ReadTextFile(IResource, String)

Reads all characters from a specified file, while detecting the encoding, and stores it in a String variable.

string ReadTextFile(
	IResource file,
	string encoding
)string ReadTextFile(
	IResource file,
	string encoding
)
file IResource
The file to be read. 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
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.

Return value

The extracted text from the file stored into a string variable.

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.