Write a VB Script to count blank Lines in a notepad

Answer Posted / pravati

Set fso=createobject("scripting.filesystemobject")
Set qfile=fso.OpenTextFile("c:Rinkuaby.txt",1,true)
Do While qfile.AtEndOfStream<>true

x=qfile.ReadLine
msgbox x
If len(x)=0 Then
y=y+1
End If
msgbox y
loop

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules to name variable in vbscript?

781


Which loop is used in case of arrays in the vbscript language?

704


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

703


why do u choose to go for testing why cant for devoloping

1815


Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?

691


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1770


Is vbscript a case-sensitive or case-insensitive?

979


What are the properties of regexp object?

784


What are class properties?

868


when we use filter funtiom invb script(QTP)

2481


What are the advantages of vbscript?

839


How will you get a subset of a array in vbscript?

753


What is loose binding? Why is it not a good practice to use it?

853


Explain the constants in vbscript?

742


Compare java script and vb script?

823