用vbs实现读取文本文件的方法
程序员文章站
2022-04-10 08:08:21
vbs读取文件方法function readfile(readfilepath) 'on error resume next &nb...
vbs读取文件方法function readfile(readfilepath)
'on error resume next
set fs = createobject("scripting.filesystemobject")
set file = fs.opentextfile(readfilepath, 1, false)
readfile=file.readall
file.close
set fs=nothing
end function
'on error resume next
set fs = createobject("scripting.filesystemobject")
set file = fs.opentextfile(readfilepath, 1, false)
readfile=file.readall
file.close
set fs=nothing
end function
上一篇: VBS编程教程 (第3篇)