Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Last Line of Text File Then Add More Lines

Status
Not open for further replies.

mac7attack

Technical User
Jan 31, 2004
47
0
0
US
All,

I would like to be able to remove the last line of a text file, add more lines to that text file and then re-add that line.

I can open the file and either write over the file or append to it but I cant figure out how to remove the last line and then append.

Thanks for your help
Matt
 
What have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes, and if possible, post what code you have tried.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top