Write a program to print all lines that contains a word either “testing” or “qtp”
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / syamala usha
set fso = createobject("scripting.filesystemobject")
set f=fso.opentextfile("C:
otes HP.txt",1)
Do until f.atendofstream
str=f.readline
a = split(str," ")
flag=0
for j = 0 to ubound(a)
if (a(j) = "testing") or (a(j) = "qtp") then
flag=1
exit for
end if
next
if flag=1 then
msgbox str
end if
loop
f.close
set f= nothing
set fso =nothing
Is This Answer Correct ? | 0 Yes | 0 No |
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
How are comments handled in the vbscript language?
w r p syed then output was deys and click eysd and click ysde and click sdey and click deys and click eysd............
Mention what is the use of option explicit in vbscript?
what is the difference between modular and data and keyword driven framework
How to Enter Values on the Command promt using VB script
Can anyone help me in write coding to get this pattern * ** *** ****
can anyone tell me the procedure of interview held in applabs
Which event is triggered when mouse focus comes out of an element in the vbscript language?
How to assign a numeric value to a variable?
Write VB script to convert from feet to inches(hint 1feet=12 inches)
How do you declare a variable in vbscript?