|
script for multi text replacement Hi
I just copy the script from Microsoft web site that for replace the text.
But how can i enhance the script for multi - text replacement. Thanks
i try with this (i put the star in front of script) , but it doesn't work.
regards
Tony
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "Jim ", "James ")
****strNewText = Replace(strText, "abc ", "apple ")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close |