var fso = new ActiveXObject("Scripting.FileSystemObject");
var list = fso.OpenTextFile("D:\\list.txt", 1, true);
var rest = /12/g;
var rezt = /ab/g;
while (!list.AtEndOfStream) {
var file = list.ReadLine();
var myInputTextStream = fso.OpenTextFile(file, 1, true);
var myOutputTextStream = fso.OpenTextFile(
file.slice(0,-4) + ".wow"
, 2, true);
myOutputTextStream.Write(
myInputTextStream
.ReadAll()
.replace(rest, "34")
.replace(rezt, "34")
)
myInputTextStream.Close();
myOutputTextStream.Close();
}
list.Close();