- @echo off
- set "s= <add key="A23" value="1" />"
- for /f "delims=" %%i in ('dir /a-d /b /s "D:\m\b.txt"') do (
- set n=0
- (for /f "usebackq delims=" %%a in ("%%i") do (
- set /a n+=1 & set "str=%%a"
- setlocal enabledelayedexpansion
- if !n! equ 20 (
- echo,!s!
- ) else (
- echo,!str!
- )
- endlocal
- ))>$
- move $ "%%i"
- )
- pause
复制代码
|