联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
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