Get Text File Line

Verb: textReadLine

Gets a line from a text file, using the indicated line number.


textReadLine [--linenumber(Numeric)] --file(TextFileReader) (String)=value


Script Designer Required AcceptedTypes Description
--linenumber Line number Optional Number Number of the line that should be obtained.
--file Text reader Required Text File Reader Variable containing the text file from which the indicated line should be obtained.


Script Designer AcceptedTypes Description
value Text Text Value indicating the success (True) or failure (False) of the text reader line movement.


The text file is opened for reading using the Open Text File for Reading command. With the Get Text File Line command, the text of the given line is obtained.

defVar --name textFileReader --type TextFileReader
defVar --name lineText --type String
// Open the file informed for reading.
// Download the following file to execute the command.
openTextReader --share "None" --path "fileText.txt" --encoding "Default" textFileReader=value
// Get the text from line "2" of the open text file.
textReadLine --linenumber 2 --file ${textFileReader} lineText=value
logMessage --message "${lineText}" --type "Info"
// The command displays the text contained in the given line.

Download File

For the correct operation of the script above, it is necessary to download the file and enter its path in the "Path" parameter of the command "Open Text File for Reading".


To use the Get Text File Line command, it is necessary to first open the text file using the Open Text File for Reading 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
  • 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
  • Read Text to the End
  • 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