关于文件读取及写入很简单,就是把电脑中的数据读和写
同时读和写有规则,这篇博文就是介绍的这些规则
读有readall 函数,就是把所有的数据都读出来
有 readline函数,读一行
还有read(n) //n自己定,读n个字节
自己看下面的代码就能掌握了
代码:
dim fso,openfile
set fso = createobject("scripting.filesystemobject")
set openfile = fso.opentextfile("d:\数据.txt",1,true)// 这里的1表示读,2表示写,8表示在最后追加
msgbox(openfile.readline()) //读一行
msgbox(openfile.read(10)) //读10个字节
msgbox (openfile.readall) //读全部的
写入就用
write 函数用于追加
详情见: