回复 9# 思想之翼
是不是这样?- @echo off&setlocal enabledelayedexpansion
- rem 文件编码为ansl
- for /l %%a in (1,1,1000) do (
- set "p=00000%%a"
- set p=!p:~-6!
- if exist "d:\HY\!p!\" (
- for /l %%b in (1,1,7) do (
- if exist "d:\HY\!p!\!p!_%%b.txt" (
- gawk -F"=" "ARGIND>1{if(b[$1]){a[ARGIND]=a[ARGIND]==\"\"?$2:a[ARGIND] \"\n\" $2;next}}{b[$0]++}END{for(i=2;i<=ARGIND;i++){ if(a[i]){f=ARGV[i];sub(/^d:\\[^^\\]+\\/,\"e:\\HY\\0%%b\\\\\",f);print(a[i])>f}}}" "e:\ZD\01\!p!\!p!_%%b.txt" "d:\HY\!p!\!p!_%%b.txt"
- )
- )
- )
- )
- pause
复制代码
|