Read From File Action—Setting Properties

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.

To set Read From File properties

  1. 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:

  1. In the File box, enter the path and file name for the file, or click the Open Folder button and navigate to the file.

  2. In the Populate variable with read data box, select the variable to populate.

  3. To limit the data read, select Read file partially, and then enter the properties as follows:

  4. 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.

  5. To set the Description tab properties, refer to Description Tab Options.

  6. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  7. When finished, click OK to save settings and close the properties dialog window.

See Also

About Actions

Adding Task Steps

Read from File Action