Search a file for string and repolace string??

Discussion in 'Scripting' started by Paul, Jul 1, 2003.

  1. Paul

    Paul Guest


    I'm new to scripting and I'm having problems already. :-(

    I need to search a file (data.ini) for a value then
    replace the text that appears after this value with a
    different string that I have stored in a variable e.g.
    change this:
    pc make = dfgdfgd
    Computername = computer1
    memory = 64
    to this:
    pc make = dfgdfgd
    Computername = computer53
    memory = 64

    Please can someone give me an example of how to do this,
    or point me to a useful article.

    Thanks in advance

    Paul, Jul 1, 2003
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.