Microsoft® Visual Basic® Scripting Edition Skip Method |
Scripting Run-Time Reference Version 2 |
Skips a specified number of characters when reading a TextStream file.
object.Skip(characters)The Skip method syntax has these parts:
Part Description object Required. Always the name of a TextStream object. characters Required. Number of characters to skip when reading a file.
Skipped characters are discarded.The following example uses the Skip method to skip the first six characters before reading from a text file:
Function SkipTextFile Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True) f.Write "Hello world!" Set f = fso.OpenTextFile("c:\testfile.txt", ForReading) f.Skip(6) SkipTextFile = f.ReadLine End Function