- 帖子
- 32
- 积分
- 43
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2015-4-12
|
回复 17# pcl_test
@echo off
setlocal enabledelayedexpansion
set n=1
(for /f "delims=" %%a in ('type "A.txt"') do (
set "str=%%a"
set "str=!str: =!"
echo,!str!
if !n! == 2 (
echo,添加内容1
echo,添加内容2
)
set/a n+=1
))>$
move $ "A测试.txt"
(for /f "delims=" %%a in ('type "B.txt"') do (
set "str=%%a"
echo,!str!
if !n! == 2 (
echo,添加内容1
echo,添加内容2
)
set/a n+=1
))>$
move $ "B测试.txt"
pause |
|