Home Search

DriveWorks Pro 22
Read Text File

Send Feedback

Read Text File

This Task will read the contents of the specified file and provide the result as a data output.


Property NameDescription
File PathThe path to the file to read.
Maximum File SizeThe maximum file size in bytes.

This defaults to 65536 when the Task is added.

TitleChanges the Title (not the name) of the task.


The following Output property can be connected to a relevant Input of another Task (for example the Constant Value Input, of the Drive Constant Value) to store the result in the Specification.

Property NameDescription
File ContentThe contents of the file.


PropertyExample ruleMeaning
File PathDWVariableDataLocation & FileToReadReturnDriveWorks will read the content of the file "\\MyServer\Data\MyTextFile.txt".
Maximum File Size25000The file size will be restricted to 25000 bytes.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:


  • The contents of the file were read successfully.

Success with Warnings

  • N/A - should never be fulfilled.

Failed (one of the following occurred)

  • No file was specified.
  • Path to file could not be resolved.
  • Path was invalid.
  • Path was too long.
  • File does not exist.
  • General failure - Check the specification report for more details.