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