Write a VB Script to count blank Lines in a notepad

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what is the use of option explicit in vbscript?

551


Which constant is used for print and display functions and works as same as pressing enter key?

532


How many types of operators are available in the vbscript language?

540


How strcomp function works?

626


What are the environments supported by vbscript language?

508






Explain a few date functions in vbscript

558


Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.

1434


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

546


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

518


Explain about arrays in vb script?

608


what is diff between static and dynaic arrys?

1590


how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

4751


Which data type/types are supported by vbscript language and what are their specialties?

599


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

815


Both Static and dynamic arrays are handled by VB script. Is it true?

615