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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare a variable in vbscript?

1117


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

1164


What is the purpose of on error resume next statement?

1040


How will you convert a string to upper case string using vbscript?

1057


please can you help me to get a code of flames using a visual basic 6

1861


Is vbscript language a case-sensitive language and what does it mean?

1066


Which operator is used to perform the comparison among 2 operands in the vbscript language?

1015


When to use function procedures and what are its characteristics?

1139


When does ‘on click of button’ event gets triggered in the vbscript language?

1075


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.

2005


Mention what is byref and byval parameters in vbscript?

1052


Explain a few date functions in vbscript

1030


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

1434


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1535


What is the difference between for loop and while loop?

1133