Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetDrive property

Status
Not open for further replies.

rajyar

IS-IT--Management
Apr 11, 2001
8
US
Hi all
Iam looking for the information to get the name of the my shared drive in our network.
I can able to get the info using my VB code but I couldn't able to do with ASP..?
Please help me how do I get info from ASP..
Here is the coding in vbscript..

Sub ShowDriveType(drvpath)
Dim fs, d, s, t
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetDrive(drvpath)
Select Case d.DriveType
Case 0: t = "Unknown"
Case 1: t = "Removable"
Case 2: t = "Fixed"
Case 3: t = "Network"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "Drive " & d.DriveLetter & ": - " & t
s = s & ": - " & d.ShareName
Response.write &quot;<br> Drive type is &quot; & s
End Sub
ShowDriveType(&quot;h&quot;)

Please guide me inthis issue..

Thanks
Raj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top