Sign in to follow this  
Followers 0
iXX

How to determine number of lines in text file?

6 posts in this topic

Hi! :bye:

I would like to overwrite last (or one before) line in a text file.

It looks that I could use  "_FileWriteLineTo".

But how to determine number of lines in such file?

Is there some simple function for this and I dont see it?  o:)

And, is there something for deleting last line?

Thanks!

 

Share this post


Link to post
Share on other sites



Not to mention, if you're wanting to append to the end of a text file, just use FileWriteLine and forget about the line numbers. The help file is your friend.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Use...

_FileWriteFromArray($File, $a_Array [, $i_Base = 0 [, $i_UBound = 0 [, $s_Delim= "|"]]])

to write the file with $UBound set to remove the last line

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks folks!

I am just little blind...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0