Replacing a line from a text file

  • Thread starter Thread starter Joaquim Pinto
  • Start date Start date
J

Joaquim Pinto

Hi All,

I'm using a richtextbox to find a particular string on a text file.

Each line has more then one string separated by comas, like this:

11-11-2004, 08:30:00, 02:56:00, 04:00

I want to find a particular date, which I can do by using the find
method and then replace the following strings with another ones.

How can I do that?

Thanks,

Joaquim Pinto
 
To replace a line in a text file you have to write a new text file (with a
different name). Then delete the original file (or rename it). Lastlly
rename the new file to the original file.

While writing your new file, insert the new line where necessary.

kevin aubuchon
 
Back
Top