The Read From File action reads data from a text file and populates a variable with the data. You can have the step read all the data from the file, or start from a specified point and read a specified number of bytes.
If you have the step read only part of the file, you can populate a variable with the new index position in the file. This enables you to create another step that begins reading the file from that point.
Any variables used must be created in earlier steps using the Create Variable action.
From the Task Builder Available Actions pane, open the File folder and double-click the Read from File action or drag it into the Steps pane. The following properties dialog appears:
In the File box, enter the path and file name for the file, or click the Open Folder button and navigate to the file.
In the Populate variable with read data box, select the variable to populate.
To limit the data read, select Read file partially, and then enter the properties as follows:
In the Read from position box, enter the character index for the starting point in the file. This box can accept a variable.
To limit the number of bytes read, select Limit number of bytes read to, and then enter the number of bytes in the box below.
a variable with the ending index, select Populate variable with new position in file,
and then select the variable in the box below. (This variable could then
be used in a later step in the Read from
position box to continue reading from the file.)
When the task runs the step will read the specified number of bytes from specified position. Any remaining text in the file will be skipped.
If you want to populate a variable with the number of bytes read, click the Advanced tab, select the check box, and then select the variable to populate.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Read from File Action