List all hard drives and types on the server with ASP

Source: Internet
Author: User
Server | The hard drive is done as described yesterday, listing all the disks for the server.
<%
function Tran (DRV)
Select Case DRV
Case 0:tran= "Device Unrecognized"
Case 1:tran= "Floppy disk drive"
Case 2:tran= "Hard drive"
Case 3:tran= "Network hard Drive"
Case 4:tran= "Optical drive"
Case 5:tran= "Ram Virtual Drive"
End Select
End Function

Set fs=server.createobject ("Scripting.FileSystemObject")
Response.Write "<table width= ' 100% ' cellpadding= ' 5 ' cellspacing= ' 2 ' ><tr><td><b> letter </td ><td><b> Drive Type
</td></tr> "
For each d in fs.drives
Response.Write "<tr><td><a href=files.asp?spath=" & D.driveletter & ": \><font size=4> <b> "&
D.driveletter & "</a></td><td><font size=4><b>" & Tran (D.drivetype) & "< /tr> "
Next
Set fs=nothing
Response.Write "</table>"
%>

ASP Boutique House Http://aspage.yeah.net
----------------------------------------
2000-5-29 by Seeker



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.