Page 1 of 1

count rows in a text file.

Posted: Fri Jan 15, 2010 5:20 am
by johanmartens
Hi
Is there a way to count how many rows there is in a text file?
 
Best regards and thanks.

count rows in a text file.

Posted: Mon Jan 18, 2010 2:25 am
by Oleg
You have to use Text Loop action.
Algorithm is simple:

set variable LineCount to 0
text loop
   inctement variable LineCount by 1
end loop

after the loop you get the number of lines of the text. If you get 0, this means that text is empty.

count rows in a text file.

Posted: Thu Jan 21, 2010 9:22 pm
by jonjon
Thanks for answer, it works perfect.