本帖最后由 pcl_test 于 2015-4-12 17:24 编辑
回复 21# wbkl | @echo off & setlocal enabledelayedexpansion | | for %%i in ("a.txt" "b.txt") do ( | | set n=1 | | (for /f "delims=" %%a in ('type %%i') do ( | | set "str=%%a" | | if %%i == "a.txt" set "str=!str: =!" | | echo,!str! | | if !n! == 2 ( | | echo,添加内容1 | | echo,添加内容2 | | ) | | set/a n+=1 | | ))>$ | | move $ "%%i" | | ) | | pauseCOPY |
|