Writing into a text file

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi,

I have an existing ASCII file.
I need to search for a value in the file and then replace the value by
another one.

Is this possible or do i have to re-write the whole file ?

Thanks.
 
Hi,


| Hi,
|
| I have an existing ASCII file.
| I need to search for a value in the file and then replace the value by
| another one.
|
| Is this possible or do i have to re-write the whole file ?

If both strings (replaced & replacing ) are of the same length you could
replace it in-place.
Otherwise you will have to rewrite the complete file.

I advise you for the second solution just in case and to be future-proof.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top