- //&cls&dir /b *.txt|cscript -nologo -e:jscript "%~f0"&pause&exit
-
- function reStr(file){
- var f = fso.opentextfile(file, 1);
- str = f.ReadAll()
- .replace(/^[0-9]+[::]/mg, '');
- //行首0-9的数字1个或多个加两个冒号中的任意一个,替换为空字符
- f.Close();
- var f = fso.opentextfile(file, 2);
- f.Write(str);
- }
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- while(!WScript.StdIn.AtEndOfStream)reStr(WScript.StdIn.ReadLine());
复制代码 仔细找找,这类文章还是能发现的 |