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

How will you get a random number between 0 and 1 in vbscript?

0 Answers  


How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.

0 Answers   College School Exams Tests,


What is the main difference between function and sub-procedure?

0 Answers  


Explain about scrrun.dll in vbscript?

0 Answers  


did any one attended interview in applabs if you had gone through plz tell me the procedure

0 Answers  






how many types of recording are there?

1 Answers  


What are the 2 ways to pass a value to the function?

0 Answers  


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

0 Answers  


How can you test font size, type and color using QTP tool?

3 Answers  


join all the array values without using join function?

1 Answers   CSS Corp,


what is test scenario?

1 Answers  


How regexp.execute method works?

0 Answers  


Categories