- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /b /a-d *.txt') do (
- set "str="
- (for /f "skip=1 usebackq delims=" %%i in ("%%a") do (
- if defined str (
- for %%j in (!str!) do echo;%%j
- )
- set "str=%%i"
- ))>"%temp%\$"
- move "%temp%\$" "%%a" >nul
- )
- pause
复制代码
|