回复 18# haichuan5121 - @echo off & setlocal enabledelayedexpansion
- if exist new.csv del new.csv
- for /f "delims=" %%a in ('dir /b *.csv') do (
- for /f "skip=36 delims=" %%b in ('type "%%a"') do (
- set str=%%b
- set str=!str:,=,$!
- for /f "delims=, tokens=4" %%c in ("!str!") do (
- if "!a!"=="" (
- if "!x!"=="" (set x=%%c) else (set y=%%c&>>new.csv echo !x:$=!,!y:$=!&set a=1)
- )
- )
- )
- set x=
- set a=
- )
- pause
- start "" new.csv
复制代码 好麻烦,只能这样了 |