Write a VB Script to count blank Lines in a notepad

Answers were Sorted based on User's Feedback



Write a VB Script to count blank Lines in a notepad..

Answer / usha

set fso=createobject("scripting.filesystemobject")
set f=fso.opentextfile("C:usha.txt")

c=0

do until (f.atendofstream)

a=f.readline()

if len(a)=0 then



c=c+1

end if


loop

msgbox c

Is This Answer Correct ?    1 Yes 0 No

Write a VB Script to count blank Lines in a notepad..

Answer / 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

More VB Script Interview Questions

Write a Script for ATM in QTP

0 Answers  


what is the standards used for writing the script in QTP

0 Answers  


generic function for webedit box for web application

1 Answers  


How regexp.execute method works?

0 Answers  


What is the difference between a dictionary and an array?

0 Answers  






after medical test,when will be the police verification

0 Answers   IBM,


write a script to count no drives in file systems in qtp?

1 Answers   Mind Q Systems,


how to find number of characters(letter a) in the sentence Rain Rain Go away

4 Answers  


Explain the operator precedence in vb script?

0 Answers  


write a program to display configuration of a local system with the help of vb script.

0 Answers  


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

2 Answers   IBM,


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

0 Answers   IBM,


Categories