Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Why is the use of exit do or exit for statements within loops discouraged?

0 Answers  


write a vbscrpit to swap values

2 Answers   Adani,


which one is more secure vb script or java script ??????? or both are same ??????

3 Answers  


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

0 Answers  


How can you have different number of cells for each row of a table in HTML?

2 Answers  


Is VBscript case-sensitive?

3 Answers  


Mention what are the rules to name variable in vbscript?

0 Answers  


How to pass the parameter from one function to another function in VB Scripting?

1 Answers   Fastenal,


Mention the environments where vbscript could be run?

0 Answers  


Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance

2 Answers  


how to add the shared repository file to the script file while running the script manuall

2 Answers  


Explain about tristate constants in vbscript?

0 Answers  


Categories