请大家多多关照!

VBScript 中的文本文件读取

上一篇 / 下一篇  2009-03-19 15:10:17 / 个人分类:脚本

Option Explicit
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim fso, file, msg

Set fso = CreateObject ("Scripting.FileSystemObject")
Set file = fso.OpenTextFile (“c:\test.txt", ForReading)
Do While Not file.AtEndOfStream
   msg = file.ReadLine
   MsgBox msg
Loop
file.Close
Set file = Nothing
Set fso = Nothing


TAG:

 

评分:0

我来说两句

日历

« 2024-05-06  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 5909
  • 日志数: 11
  • 建立时间: 2009-01-11
  • 更新时间: 2009-03-26

RSS订阅

Open Toolbar