- @echo off&setlocal enabledelayedexpansion
- set "SourDir=E:\DCOPY\test"
-
- cd /d "%SourDir%"
- for /f "delims=" %%a in ('dir /a-d /s /b "%SourDir%\*.txt"') do (
- set/a n=0
- for /f "delims=" %%i in ('findstr /n ".*" "%%a"') do (
- set/a n+=1
- if not !n!==10 (if not !n!==11 (
- set "var=%%i"&&set var=!var:*:=!
- echo.!var!
- ))
- )
- )>"%%a.log"
- pause&exit
复制代码
|