pcl_test 当前离线
荣誉版主
TOP
CrLf 当前离线
论坛巡查
@echo off for /f "delims=" %%a in ('dir /a-d /b *.txt') do ( gawk "FNR==2{print FILENAME};1" "%%a" >$ ren $ "%%a" )复制代码
wzf1024 当前离线
一级士官
@echo off ::取决more的限制 for /f "delims=" %%a in ('dir /a-d /b *.txt') do ( ( set/pa= setlocal enabledelayedexpansion echo;!a! endlocal echo;%%~na more +1 )<"%%a">$ move $ "%%a" ) pause复制代码
评分人数
happy886rr 当前离线
等待验证会员
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%A in ('dir /a-d /b /s *.txt') do ( (for /f "tokens=1* delims=:" %%a in ('type "%%A"^|findstr /n .*') do ( if %%a equ 2 (echo,%%~nA) echo,%%b ))>"%%A.bak" del "%%A" ren "%%A.bak" "%%~nxA" ) set /p =执行完毕!复制代码