I Just wondered if anybody had a idea of how to delete a line of text from a text file…?
without creating a new file and copying all lines except the one to be deleted.
Would use SQLite normally but is not my file and cannot change it over to SQlit.
Have managed to input over 10000 lines of text into memory and dupmp them back to the file so thank you very much.
Never thought about doing it that way think my brain is going.
Have just noticed that when I close the folderitem it adds a line onto the file but nothing shows in the file but can delete the line after the last line output it seems it putting carriage returns or something anybody any idea…?
Have looked at the file using hex editor and the last to hex numbers are 0D 0A I believe these ar carraige return and linefeed.l
anybody got a way to stop them being output.
Thanks for all the help and info have now done what I needed to do.
Read Whole File
Split using array.Split(CHr(10))
loop thru and ignore line not required.
Put text back to one block
remove file
create file
write back to file.
Close File