Command Reference

Count Text Lines

This action will count the number of lines in a text file. A line is defined as a string of ASCII text followed by a carriage return-line feed pair.

Action ID: 42
Action Category: Text Files

Settings

File name:

The full path and filename of the text file whose lines you wish to count.

Default value:

The default value to store in your variable in case the number of lines cannot be counted.

Store line count in variable:

The variable that will store the number of lines in the text file.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Failed to count text lines.

File not found.
<<File name>>

2

Failed to count text lines.

Error opening file.
<<File name>>

3

Failed to count text lines.

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