Link to home
Start Free TrialLog in
Avatar of 91mustang
91mustang

asked on

getting # of lines in file

hello, how can i get the number of lines in a text file without looping though the lines?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

You can't really. Why would you want to though?
Avatar of 91mustang
91mustang

ASKER

I have an app that reads a file in line parses line, inserts to DB,next line....

I want to use a Jprogress bar and use the number of lines in file as the maximum value for proggress bar
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You'll need to do a pre-parse/dbInsertion parse to compare every character for '/n' and sum them.
thanks CEHJ
8-)