write a Vb script to find a whther a selected drive exits.



write a Vb script to find a whther a selected drive exits...

Answer / cnu_thatavarthi

Option Explicit
Dim objFso, objFile,iCount,strDrivers

Set objFso = CreateObject("Scripting.FilesystemObject")
MsgBox objFso.Drives.Count

For iCount = 1 To objFso.Drives.Count

strDrivers = strDrivers & vbNewLine &objFso.Drives.Item(iCount).DriveType

Next
MsgBox strDrivers

If objFso.DriveExists("iTunes") Then
MsgBox "Driver is Exists"
Else
MsgBox "Drive is not exists"

End if

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

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?

0 Answers  


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

0 Answers  


What is the purpose of the err object in the vbscript language?

0 Answers  


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.

0 Answers  


what is the function to display current date?

4 Answers  






Consider there are objects in a webapp which are identified by QTP. Suppose you know only the logical name of a object(absolutely nothing else about it). Which approach will you take to find the "micClass" of the object(You can't use Object Spy, or can't add the object in repository)?

2 Answers   HCL,


Which object provide information about a single runtime error in a vbscript?

0 Answers  


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


Why do we use Option Explicit?

6 Answers  


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

0 Answers  


1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 how to find using vbscripting

3 Answers  


how many types of recording are there?

1 Answers  


Categories