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
What are the rules to name variable in vbscript?
Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.
What is select case statement?
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?
How to Import data from a file (file is on the desktop) to the data table
Which loop is used in case of arrays in the vbscript language?
Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards
What is purpose of scripting.filesystemobject class in vbscript?
In what way program "hello world" you can write in vbscript?
Description.Create
Mention the rules for using option explicit statement?
Which operator can be used to check if two numbers are equal or not in vbscript?
What are the uses of vb script?
Does VB/Win make standalone .EXE files?
Explain about scrrun.dll in vbscript?