Command Reference

Find Text Line

This action will search a text file for specific text and return the zero-based line number where the text is found.

Action ID: 44
Action Category: Text Files

Settings

File name:

The full path and filename of the text file to search in.

Search for the line containing the following text:

This is the string that the action will search for. The search is not case-sensitive.

Start search at line number:

The zero-based line number that you want to start searching from. Note: the line at this line number will be included in the search.

Store line number in variable:

This is the variable that will store the zero-based line number that represents the line where the search string was found.

Default value:

This is the default value of the variable. The variable will be set to this value if the text is not found in the text file.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Failed to find text line.

File not found.
<<File name>>

2

Failed to find text line.

Error opening file.
<<File name>>

3

Failed to find text line.

The file is too large to be read
<<File name>>

Example

None available.

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab