set fso=createobject("scripting.filesystemobject")
ah=inputbox("请输入A的行号:")
bh=inputbox("请输入B的行号:")
set cfile=fso.OpenTextfile("c.txt")
do while cfile.atendofstream<>true
n=cfile.readline:hh=cfile.line-1
if hh=cint(ah) then n= a & n '此处看看A文件和B文件最后一行是不是以回车结束
if hh=cint(bh) then n= b & n '如果不是可改为n= b & vbcrlf & n
s=s & n & vbcrlf
loop
cfile.close
set file=fso.createtextfile("#c.txt")
file.write s
file.close
createobject("wscript.shell").run "#C.TXT"
function a
set file=fso.opentextfile("a.txt")
a=file.readall
file.close
end function
function b
set file=fso.opentextfile("b.txt")
b=file.readall
file.close
end function