ASP SkipLine Method
Last Updated :
16 Feb, 2022
The ASP SkipLine Method is used to skip one line from a text file at the time of reading the file contents. It is a predefined method of the TextStream Object.
Syntax:
TextStreamObject.SkipLine
Example: Below code illustrates the ASP SkipLine Method.
ASP
<%
dim gfg,f,t,x
set gfg=Server.CreateObject( "Scripting.FileSystemObject" )
set f=gfg.CreateTextFile( "d:\GFG.txt" )
f.writeline( "Hello geeks" )
f.writeline( "Google Chrome" )
f.writeline( "Sudo placement" )
f.close
set t=gfg.OpenTextFile( "d:\GFG.txt" ,1,false)
t.SkipLine
x=t.ReadAll
t.close
Response.Write( "Output after skipping the first line is: " )
Response.Write(x)
%>
|
Output:
Output after skipping the first line is:
Google chrome
Sudo placement
Share your thoughts in the comments
Please Login to comment...