本帖最后由 pcl_test 于 2016-2-8 23:58 编辑
- //&cls&dir /b *.txt *.flt|cscript -nologo -e:jscript "%~f0"&pause & exit
-
- function reStr(file){
- var f = fso.opentextfile(file, 1);
- var n=0, str = f.ReadAll().replace(/:A~B:(?!\s*$)/g, function($0){
- n++; return n%2?'-':$0
- });
- 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());
复制代码
|