Jump to content
Sign in to follow this  
iXX

How to determine number of lines in text file?

Recommended Posts

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.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...