- @echo off
- more +4 "%0" | mshta http://bathome.net/s/hta/ "eval(WSH.StdIn.ReadAll())"
- pause&exit
-
- dir().files().grep(/\.trc$/i)._each(
- function(file){
- bin=iconv.load(file);
- bom=iconv.checkBom(bin);
- if(bom=='undefined')bom=iconv.toStr(bin,'gb2312')?'gb2312':'utf-8';
- text=iconv.toStr(bin,bom);
- text=text.replace(/<[^<]*>/g,'');
- iconv.saveText(text,'New_'+file,bom)
- }
- )
复制代码
|