回复 4# taofan712
非常感谢- @echo off
- cd /d "%~dp0"
- md "$结果\" 2>nul
- for %%a in ("%cd%") do set "fd=%%~nxa"
- for /f "delims=" %%a in ('dir /a-d/b *.csv') do (
- echo;"文件名" , A , B , C >"$结果\%%a"
- (for /f "delims=" %%b in ('type "%%a"') do (
- echo;%fd%,%%~na,%%b
- ))>>"$结果\%%a"
- )
- pause
复制代码 ABC 标题加了逗号分隔才能把表头分列 还是很感谢! |