- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /a-d/s/b ^|findstr /i /r ".txt .asp .htm .html"') do (
- set/a n=0&set "file_path=%%a"
- for /f "delims=" %%i in ('type "%%a"') do set/a n+=1&&set "line[!n!]=%%i"
- call set "line[0]=%%line[!n!]%%"&set/a n-=1
- (for /l %%b in (0,1,!n!) do call echo !line[%%b]!)>"%%a"
- )
-
- pause
复制代码
|