Globally replace text in several files: Difference between revisions

Line 1,115:
With CreateObject("Scripting.FileSystemObject")
For i = 0 To UBound(strFiles)
strText = .OpenTextFile(strFiles(i), 1ForReading).ReadAll()
With .OpenTextFile(strFiles(i), 2ForWriting)
.Write Replace(strText, "Hello New York!", "Goodbye London!")
.Close
Anonymous user