- ·上一篇文章:VBS实现倒计时提示功能
- ·下一篇文章:用vbs实现随机读取文件的一行内容的脚本
- ·百度中搜索更多的关于“用vbs实现读取文本文件的方法”相关内容
- ·谷歌中搜索更多的关于“用vbs实现读取文本文件的方法”相关内容
- ******申明******
- 本站文章内容有部分为收录网络中其他网友内容,DOS资源站不保证所有的代码都适合你使用。
- 由于编辑匆忙,有可能造成某些脚本文件出现丢失代码或代码无法运行的情况,请网友根据情况自行修改。
- 如果能将出错部分反馈给我,那就更好了。
用vbs实现读取文本文件的方法
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

