qtp script to read first line of a text file
Dim a,b
Const ForReading = 1
Set a=CreateObject( "Scripting.FileSystemObject" )
Set b=a.OpenTextFile( "C:\qtp.txt",1)
Msgbox b.Readline
qtp script to read first line of a text file-vb script to read first line of a text file
qtp script to insert blank lines into text file-vb script to insert blank lines into text file
qtp script to insert blank lines into text file
Dim a,b
Set a=CreateObject("Scripting.FileSystemObject")
Set b=a.CreateTextFile("c:\qtp.txt", True)
b.WriteLine("hiii")
b.WriteBlankLines(5)
b.WriteLine ("helloooo")
b.Close
qtp script to read last line of a text file-vb script to read last line of a text file
qtp script to read last line of a text file
Dim a,b,c
Set a = CreateObject("Scripting.FileSystemObject")
Set b = a.opentextfile("C:\qtp.txt", 1)
i = 0
Do While b.AtEndOfStream <> True
c = b.ReadLine
i = i + 1
Loop
MsgBox c
QTP Script to count number of lines in a text file-VB Script to count number of lines in a text file
QTP Script to count number of lines in a text file.
Dim a,b
Const ForReading = 1
Set a=CreateObject( "Scripting.FileSystemObject" )
Set b=a.OpenTextFile( "C:\qtp.txt",1)
b.ReadAll
Msgbox "Number of lines= " & b.Line
Subscribe to:
Posts (Atom)