3 Years
Discussion Span
Last Post by Traevel

But how will anyone know it was updated if you delete it first?

In case you meant delete or update, then

For update:

  1. Read the file line by line
  2. Manipulate the line
  3. Write back to file

For deletion:

  1. Read the file line by line
  2. Store the lines you want to keep
  3. Write those back to file

super secret shortcut for the above steps

In all seriousness though, seeing as your file isn't very big you could probably store every line in an array, manipulate/delete those and write each value back to a file, it's nothing fancy and plenty of information already exists. Especially since it's a very general question with hardly any specifics or prework.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.