OBJECT: Drives Collection
Implemented in version 3.0
collection is the collection of all the disk drives available on the system. This collection is obtained through the
property of the
The following code gets the
collection, creates a list of available drives and displays the results in the browser.
Dim filesys, drv, drvcoll, drvlist, vol
Set filesys = CreateObject("Scripting.FileSystemObject")
Set drvcoll = filesys.Drives
For Each drv in drvcoll
drvlist = drvlist & drv.DriveLetter
If drv.IsReady Then
vol = drv.VolumeName
drvlist = drvlist & vol & ", "
Response.Write "Drives available on this system are " & drvlist
"Drives available on this system are A, C, D, E, "
Returns an integer that tells us how many
objects there are in the collection (the number of local and remote drives available).
property allows us to retreive the value of an item in the collection designated by the specified
argument and also to set that value by using
[ = itemvalue]
Copyright 1999-2004 by Infinite Software Solutions, Inc. All rights reserved.