- @set @n=0;/* & echo off
- dir /b *.txt|cscript -nologo -e:jscript "%~0" ""
- pause & exit/b & rem */
- arg = WScript.Arguments(0);
- fso = new ActiveXObject("Scripting.FileSystemObject");
- while (!WSH.StdIn.AtEndOfStream) {
- f = WSH.StdIn.ReadLine();
- txt = fso.OpenTextFile(f,1).ReadAll()
- .replace(/\r\n一[0-9\r\n一]*一\r\n/mg,"");
- fso.OpenTextFile(f,2).Write(txt);
- }
复制代码 这个直接修改不留换行 |