koenp Posted September 12, 2013 Share Posted September 12, 2013 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 Link to comment Share on other sites More sharing options...
Solution koenp Posted September 12, 2013 Author Solution Share Posted September 12, 2013 Okay my fault.. Here is the working code for those who think it is usefull #include <File.au3> $XMLfile = @ScriptDir & "\etc\QC.xml" $XMLfileWR = FileOpen($XMLfile, 1) $find = "</record>" $replace = "" _ReplaceStringInFile($XMLfile, $find, $replace) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now