Jump to content
Sign in to follow this  
koenp

Replace a string in a text file

Recommended Posts

koenp

Hello everybody,

I am wondering if somebody could help me in a small script that is able to replace the string <record> in a text file.

Here is what I already have..

#include <File.au3>

$XMLfile = @ScriptDir & "\etc\QC.xml"
$XMLfileWR = FileOpen($XMLfile, 1)

;REMOVE </record> in XML
    $find = "</record>"
    $replace = ""
    ReplaceStringInFile($XMLfile, $find, $replace)

The string appears only 1time in the text file

Many thanks for all your help.

 

Kindly regards

Koen
 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×