hyundal0 当前离线
列兵
zhanglei1371 当前离线
六级士官
for /f "usebackq delims=" %%i in (`dir /a-d /b /s *.txt`) do (gawk -F, "BEGIN{OFS=\",\"}{print $1,$2,$3,$4,$5,$6,$5}" "%%i" >>"%%~dpi\tem_%%~ni_new%%~xi")复制代码
TOP
PS2.0 当前离线
上等兵
@echo off powershell -c "Get-ChildItem *.txt | ForEach-Object {$NewFile = 'New-' + $_.Name; Get-Content $_ | ForEach-Object {$a = $_ -split ','; $a[6]=$a[4]; $a -join ','} | Out-File $NewFile}"复制代码