METHOD:
TextStream.SkipLine
Implemented in version 2.0
object.SkipLine
Moves the file pointer from its current position to the beginning of the next line.
Code:
<% dim filesys, text, readfile, contents
set filesys =
CreateObject("Scripting.FileSystemObject")
Set text = filesys.CreateTextFile("c:\somefile2.txt")
text.WriteLine "A quick example of the SkipLine method"
text.WriteLine "Well, maybe not so quick!"
text.WriteLine "This should be enough!"
text.close
set readfile =
filesys.OpenTextFile("c:\somefile2.txt", 1, false)
readfile.SkipLine
contents =
readfile.ReadLine
readfile.close
Response.Write
"Line 2 contains the following text - '" & contents & "'."
%>
Output:
"Line 2 contains the following text - 'Well, maybe not so quick!'."
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information
|