- info="互助互利,支付宝扫码头像,感谢打赏"
- '有问题,可加QQ956535081及时沟通
- Set fso=CreateObject("Scripting.Filesystemobject")
- Set dic=CreateObject("Scripting.Dictionary")
- infile=".\文本A.txt"
- outfile=".\结果.txt"
- dic.Add "2","aaa"
- dic.Add "3","bbb"
-
- Set f1=fso.OpenTextFile(infile,1)
- Set f2=fso.CreateTextFile(outfile,2)
- n=0
- Do While f1.AtEndOfStream<>true
- n=n+1
- line=f1.ReadLine
- If dic.Exists(CStr(n)) Then
- f2.WriteLine dic.Item(CStr(n))
- Else
- f2.WriteLine line
- End If
- Loop
- f1.Close
- f2.Close
-
- msgbox info
复制代码
|