Read Text to the End

Verb: readTextToEnd

Available from: <Standard>

Reads the contents of a text file that was opened for reading.

Syntax

readTextToEnd --file(TextFileReader) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--file Text File Required Text File Reader Text file that was opened for reading.
To obtain the text file, it is necessary to use the Open Text File for Reading command.

Outputs

Script Designer AcceptedTypes Description
value Text Text Contents of the text file that was read.

Example

This command reads the contents of a text file opened by the Open Text File for Reading command from an index given in the Go to Text Reader Line command.

defVar --name desktopPath --type String
defVar --name filePath --type String
defVar --name textReader --type TextFileReader
defVar --name text --type String
defVar --name rowNumber --type Boolean
getSpecialFolder --folder "Desktop" desktopPath=value
writeToFile --value "IBM Robotic Process Automation, Intelligent Automation.\r\n\r\nIBM Robotic Process Automation, Intelligent Automation." --file "${desktopPath}\\text.txt" --overwrite  filePath=value
openTextReader --share "Read" --path "${filePath}" --encoding "Default" textReader=value
textReaderGoTo --linenumber 3 --file ${textReader} rowNumber=value
readTextToEnd --file ${textReader} text=value
logMessage --message "${text}" --type "Info"

Remarks

You can set the index to start reading using the Go to Text Reader Line command.

See Also

  • Binary Read Int
  • Close Binary File
  • Close Text File
  • Get Binary File Boolean
  • Get Binary File Characters
  • Get Binary File Text
  • Get Date and Time in Binary
  • Get Table from a Text File
  • Get Text File Line
  • Go to Text Reader Line
  • Move Index in Binary File
  • Open Binary File for Reading
  • Open Binary File for Writing
  • Open Text File for Reading
  • Open Text File for Writing
  • Read Binary File Decimal
  • Read Binary File Time Span
  • Read Delimited Line of Text File
  • Save Changes to Binary File
  • Save Changes to Text File
  • Write Boolean in Binary File
  • Write Date Time in Binary File
  • Write Decimal to Binary File
  • Write Delimited Text Line to Text File
  • Write Delimited Texts in Text File
  • Write in Text File
  • Write Integer to Binary File
  • Write Text in Binary File
  • Write Text Line to Text File
  • Write Time Span in Binary File