Skips a specified number of characters when reading a TextStream file.
object.Skip(characters)
Skipped characters are discarded.
The following example illustrates the use of the Skip method:
[JScript] function SkipDemo() { var fso, f, r; var ForReading = 1, ForWriting = 2; fso = new ActiveXObject("Scripting.FileSystemObject") f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true); f.WriteLine("Hello world!"); f.WriteLine("JScript is fun"); f.Close(); f = fso.OpenTextFile("c:\\testfile.txt", ForReading); f.Skip(6); r = f.ReadLine(); return(r); } [VBScript] 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
Close Method | Read Method | ReadAll Method | ReadLine Method | SkipLine Method | Write Method | WriteLine Method | WriteBlankLines Method
Applies To: TextStream Object