Skip Method
Skips a specified number of characters when reading a TextStream file.
Syntax
object.Skip(characters)
Arguments
object
Required. Always the name of a TextStream object.characters
Required. Number of characters to skip when reading a file.
Remarks
Skipped characters are discarded.
The following example illustrates the use of the Skip method:
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);
}
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
Applies To:
See Also
Close Method (FileSystemObject)
Read Method
ReadAll Method
ReadLine Method
SkipLine Method
Write Method (FileSystemObject)
WriteLine Method (FileSystemObject)
WriteBlankLines Method