ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods







Property:  Drives Collection.Item

object.Item (drive)

This property returns an Item from the collection relating to a specified key (drive name).

The following code shows how to retrieve an item from a Drives collection.

<%
Code:
Dim filesys, drvcoll, label
Set filesys = CreateObject("Scripting.FileSystemObject")
Set drvcoll = filesys.Drives
label = drvcoll.Item("c")
Response.Write "The volume label for drive c is '" & it & "'."
%>

Output:
"The volume label for drive c is 'C:'."