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
How do you declare a variable in vbscript?
What is the purpose of the err object in the vbscript language?
What is the purpose of on error resume next statement?
How will you convert a string to upper case string using vbscript?
please can you help me to get a code of flames using a visual basic 6
Is vbscript language a case-sensitive language and what does it mean?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
When to use function procedures and what are its characteristics?
When does ‘on click of button’ event gets triggered in the vbscript language?
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.
Mention what is byref and byval parameters in vbscript?
Explain a few date functions in vbscript
What is the purpose of folders object of scripting.filesystemobject class in vbscript?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
What is the difference between for loop and while loop?