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

What is the use of the formatdatetime function in the vbscript language?

547


What are the naming conventions while declaring a variable in the vbscript language?

612


How to replace junk code recorded by QTP with a mall function.

1644


how to automatically update the sql server2005 database records when insert in vb6?

1482


Explain different types of segment?

563






How are values assigned to the variables in the vbscript language?

567


What are lbound and ubound in the vbscript language?

600


what is diff between static and dynaic arrys?

1584


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.

1502


What is select case statement?

596


what do you mean .ota mobile format

1937


Explain vbscript in detail?

615


Mention what are the rules to name variable in vbscript?

532


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

483


Mention what is vbscript?

593