@LINES

Print Topic  Return to Overview  Previous Topic  Next Topic 

@LINES[filename]:  Returns the line number of the last line in the file, or "-1" if the file is empty. The first line in the file is numbered 0, so (for example) @LINES will return 0 for a file containing one line. To get the actual number of lines, use %@INC[%@LINES[filename]].

 

The filename must be in quotes if it contains white space or special characters.

 

@LINES works with files having lines of no more than 8,191 characters; longer lines will not be counted accurately.  @LINES must read each line of the file in order to count it, and will therefore cause significant delays if used on a large file.

 

@LINES can count lines in file streams on NTFS drives if the stream name is specified. See NTFS File Streams for additional details on file streams.

 

 

Topic "f_lines.htm" last edited 9/28/2006. ©2008  JP Software, Inc.
Keywords: @LINES