vbs读取TXT每一行并赋值到变量a

vbs代码:

Dim fso,f,a
Set fso = CreateObject("Scripting.FileSystemObject")
Set f=fso.OpenTextFile("D:\test.txt",1)
DO While f.AtEndOfStream <> True
 a=f.ReadLine 

 msgbox a
loop

test.txt内容



10899
10900 20000 20001 20002 20003

 

posted @ 2017-08-23 14:11  LLSix  阅读(2732)  评论(0编辑  收藏  举报