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

Explain about constants in vb script?

968


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

2968


In html file what is an ideal position to include vbscript?

1357


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.

1887


What is purpose of scripting.filesystemobject class in vbscript?

1061


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

930


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

987


How will you get a random number between 0 and 1 in vbscript?

1226


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

984


How many types of procedures are available in the vbscript language?

943


filter the array values without using filter function?

2041


Which operator is used to concatenate the 2 values in the vbscript language?

959


How to open a file. What is the perpose of true and false mode there?

1054


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

2051


Explain what is loose binding? Why is it not a good practice to use it?

1023