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
Explain about constants in vb script?
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
In html file what is an ideal position to include vbscript?
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.
What is purpose of scripting.filesystemobject class in vbscript?
How will you convert a string to upper case string using vbscript?
What are the naming conventions while declaring a variable in the vbscript language?
How will you get a random number between 0 and 1 in vbscript?
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
How many types of procedures are available in the vbscript language?
filter the array values without using filter function?
Which operator is used to concatenate the 2 values in the vbscript language?
How to open a file. What is the perpose of true and false mode there?
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.
Explain what is loose binding? Why is it not a good practice to use it?