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

hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  


write a vbscrpit to swap values

2 Answers   Adani,


write a vb script to rename a folder from tree4 to tree7

3 Answers  


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

0 Answers  


When importing an excel file that has several columns each with different number of rows into QTP's Global datatable, how can you count the number of rows in a particular column?

3 Answers   Logica CMG, McGraw Hill,






what is test scenario?

1 Answers  


filter the array values without using filter function?

0 Answers   CSS Corp, WQED,


How can constants be declared in the vbscript language?

0 Answers  


Why is error handling required?

0 Answers  


how to write function to validate the number of characters entering into the text box?

2 Answers   TCS,


How will you release the memory acquired by an array variable in vbscript?

0 Answers  


how to write validation function for date in vb script

0 Answers  


Categories