Write a program to print all lines that contains a word either “testing” or “qtp”
Answer Posted / amit
''' Write a program to print all lines that contains a word either “testing” or “qtp”
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile("C:UsersAmit MoolchandaniDesktop est.txt",1,True)
Do While objFile.AtEndOfStream <> True
str = objFile.ReadLine
If Instr(1,str,"Testing",1) Or Instr(1,str,"qtp",1) Then
Print str
End If
Loop
objFile.Close
Set objFile = Nothing
Set fso = Nothing
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
How to Import data from a file (file is on the desktop) to the data table
What are lbound and ubound in the vbscript language?
Which function is used to perform string comparison?
How can constants be declared in the vbscript language?
What are class properties?
what is the object hyrarchy in QTP for a web based application
What is the difference between javascript and vbscript?
Explain How do you create a recordset object in vbscript?
How will you compare two strings in vbscript?
How to replace junk code recorded by QTP with a mall function.
How you can call vbscript functions?
how to acces the remote mechine using vb cript(QTP)
In html file what is an ideal position to include vbscript?
Compare java script and vb script?