- PowerShell -c "dir *.txt | ForEach{$str=(type $_) -join '' -replace '[^\u3400-\u9FFF]+'; sc ($_.Name+'.Log') -value $str}"
复制代码
- @if(0)==(0) echo off
- dir /b *.txt | cscript //nologo //e:jscript "%~f0"
- pause & goto :EOF
- @end
-
- var fso = new ActiveXObject('Scripting.FileSystemObject');
-
- while(!WSH.StdIn.AtEndOfStream){
- var strFile = WSH.StdIn.ReadLine();
- var str = fso.OpenTextFile(strFile, 1).ReadAll().replace(/[^\u3400-\u9FFF]+/g, '');
- fso.OpenTextFile(strFile + '.Log', 2, 1).Write(str);
- }
复制代码 参考:中日韩统一表意文字字符集范围 |