本帖最后由 pcl_test 于 2015-5-10 11:35 编辑
vbs- Dim fso,File1,File2,MyArr,s
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set File1= fso.OpenTextFile(".\测试.txt", 1 , True)
- Set File2 = fso.CreateTextFile(".\结果.txt", 2 ,False)
- Do While File1.AtEndOfStream <> True
- str=Replace(File1.ReadLine,Chr(9)," ")
- MyArr = Split(str)
- s=""
- for i=1 to MyArr(1)
- s=s&MyArr(0)
- Next
- File2.WriteLine s
- loop
- File1.Close
- File2.Close
- MsgBox "完成!"
复制代码
|