METHOD:  TextStream.Skip

object.Skip (characters)

This method causes the file pointer to skip the number of characters specified in the argument when reading a TextStream file. It can be a positive or negative number allowing you to go forwards or backwards in the text.

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 Skip method"
text.close
set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
readfile.Skip(10)
contents = readfile.ReadLine
readfile.close
Response.Write "From column 11 the line contains the following text - '" &_
                                contents & "'."
%>

Output:
"From column 11 the line contains the following text - 'ample of the Skip method'."

Copyright 1999 by Infinite Software Solutions, Inc.
Trademark Information