- @set @n=0;//&dir /b *.txt|cscript -nologo -e:jscript "%~0" & pause&exit/b
- fso = new ActiveXObject("Scripting.FileSystemObject");
- while (!WSH.StdIn.AtEndOfStream) {
- f = WSH.StdIn.ReadLine();
- txt = fso.OpenTextFile(f,1).ReadAll();
- txt = txt.replace(/.*: *((\d *)+)$/mg,
- function(s,s1) {return s1.replace(/(.) */g," $1").substr(1)}
- );
- fso.OpenTextFile(f,2).Write(txt);
- }
复制代码
|