Deleting lines - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Deleting lines

How can i delete ie. only the third line of a textfile?


Comments

  • Hello,



    : How can i delete ie. only the third line of a textfile?



    I think that your best bet is to read all of the lines of the file in to an array, then write each one back to the file, missing out the one that you want to delete.



    There may be a better way of doing it. I have to go out now, but I'll try and remember to post some kind of code later if you want.



    J. Worthington








    URL:http://www.jwcs.net/

Sign In or Register to comment.