本帖最后由 apang 于 2014-7-24 18:32 编辑
- @set @n=0;/* & echo off
- dir /b *.txt | cscript -nologo -e:jscript "%~0"
- pause & exit/b & rem */
- fso = new ActiveXObject("Scripting.FileSystemObject");
- while (!WScript.StdIn.AtEndOfStream) {
- file = WScript.StdIn.ReadLine();
- f = fso.OpenTextFile(file, 1);
- txt = f.ReadAll().replace(/(.)(【.+?)/g, "$1\r\n$2");
- f.Close(); f = null
- fso.CreateTextFile(file, true).Write(txt);
- }
复制代码
|