October 29, 2025, 07:13:44 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Re-writing files

Started by Brian, May 14, 2011, 04:02:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hello,

I need to open a sequence of text files, take out the first line, and then
write them back with the same filename

Any ideas as to how best achieve this? I'm not bothered about code,
just the best and most efficient way to do it

Thanks,

Brian

LarryMc

when I do that sort of thing I open a second, temp, file.
read all the first and write to the second
close the 1st, delete it.
rename the 2nd to the name of the 1st.

It's easy to code.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library