- @echo off & cd /d "%~dp0"
- setlocal enabledelayedexpansion
- set "delLine=3,4,5,7,8,9,13,13,14,"
- for %%i in ("*.xml") do (
- echo %%i
- (
- for /f "tokens=1* delims=:" %%a in ('findstr /n .* "%%i"') do (
- if "!delLine:%%a,=!"=="!delLine!" (
- echo.%%b
- )
- )
- ) >"%%i_new"
- move /y "%%i_new" "%%i"
- echo -----------------------------------
- )
- pause&exit
复制代码
|