本帖最后由 pcl_test 于 2015-3-19 20:37 编辑
回复 1# tanjinkai - @echo off
- setlocal enabledelayedexpansion
- set na=1
- (for /f "delims=" %%a in ('type "a.txt"') do (
- set nb=1
- for /f "tokens=2" %%b in ('type "b.txt"') do (
- if !nb! == !na! set b=%%b
- set /a nb+=1
- )
- set nc=1
- for /f "tokens=2" %%c in ('type "c.txt"') do (
- if !nc! == !na! set c=%%c
- set /a nc+=1
- )
- echo,%%a !b! !c!
- set /a na+=1
- ))>new.txt
复制代码
|