本帖最后由 WHY 于 2017-3-11 21:06 编辑
- @if (0)==(0) echo off
- dir /b /a-d /s *.txt | cscript //nologo //e:jscript "%~f0"
- pause & goto :EOF
- @end
-
- var str = WSH.StdIn.ReadAll();
- var arr = str.split('\r\n'), len = arr.length;
- var map = [];
-
- for(var i=0; i<len; i++) {
- var key = arr[i].replace(/.+\\(.+)$/, '$1').toLowerCase();
- map[key] ? map[key].push(arr[i]) : map[key] = [arr[i]]
- }
-
- for(key in map) {
- if(map[key].length > 1) WSH.Echo('重复:\r\n' + map[key].join('\r\n'))
- }
-
- var m = str.match(/.*(?:[\uFF10-\uFF19\uFF21-\uFF3A ']|副本|--)[^\\]*\r\n/ig);
- if(m) WSH.Echo('指定字符:\r\n' + m.join(''))
复制代码
|