回复 1# 暴雪英雄
建立“映射关系.txt”文件,如:- 办公室 01办公室.docx
- 财务部 02财务部.docx
- 公关部 03公关部.docx
复制代码 下载gawk( http://bcn.bathome.net/tool/4.1.0/gawk.exe ),执行如下脚本:- dir *.doc*/b>1.txt
- gawk "FNR==NR{map[$1]=$2;next}{for(i in map)if($0 ~ i){printf( \"move /Y \\\"%%s\\\" \\\"%%s\\\"\n\",$0,map[i]);next}}" 映射关系.txt 1.txt|cmd.exe
- del 1.txt
复制代码
|