Read Number of Lines in txt file [RESOLVED]
Is there a simple way to find out how many lines there are in a txt file?
I need the number of lines in the text file i have open in order to calculate how long it will take to process it for my progress bar, but I'm not sure how to count the lines...
What my program does is run through line by line decrypting it. now, this takes a while on large files. So a progress bar would be very handy. I'll just set the max thing of the progress bar to the amount of lines, then add to the count by 1 each time a line gets processed.
This alright? All I need now is to know how many lines there are.
Thanks a bunch!