Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2698


How to Import data from a file (file is on the desktop) to the data table

2129


What are lbound and ubound in the vbscript language?

1147


Which function is used to perform string comparison?

1190


How can constants be declared in the vbscript language?

1063


What are class properties?

1227


what is the object hyrarchy in QTP for a web based application

2464


What is the difference between javascript and vbscript?

1232


Explain How do you create a recordset object in vbscript?

1068


How will you compare two strings in vbscript?

1128


How to replace junk code recorded by QTP with a mall function.

2133


How you can call vbscript functions?

1156


how to acces the remote mechine using vb cript(QTP)

2088


In html file what is an ideal position to include vbscript?

1468


Compare java script and vb script?

1142