请教一个VBS脚本!

来源:百度知道 编辑:UC知道 时间:2024/05/13 11:53:27
求一个VBS脚本。能够读取文本中的第一行后输出。接着删除第一行。那么第二行就再成为第一行。反复读取输出。我现在这样后面该怎么接着写?
VBS Dim FSO
VBS Const ForReading = 1
VBS Set FSO= CreateObject("Scripting.FileSystemObject")
VBS Set X = FSO.OpenTextFile("e:\a.txt", ForReading)
VBS test=X.ReadLine
SayString test

do loop ???

Const ForReading = 1
Set FSO= CreateObject("Scripting.FileSystemObject")
Set X = FSO.OpenTextFile("e:\a.txt", ForReading)
do until x.atendofstream
test=X.ReadLine
msgbox test
loop

如过只是要循环读取每一行文本,是不需要去删除第一行的,只需要循环ReadLine直到atendofstream即可。