The Drives object is a collection that needs to be used with an enumerator to access the individual drive items.
// Instantiate a file system object
myFileSystem = new ActiveXObject("Scripting.FileSystemObject");
// Create an enumerator
myEnum = new Enumerator(myFileSystem.Drives);
// Traverse the Drives collection via the enumerator
for(; !myEnum.atEnd(); myEnum.moveNext())
{
processDrive(myEnum.item());
}
// A function to do something with each disk drive
function processDrive(aDrive)
{
...
}| See also: | FileSystem.Drives[] |
| Prev | Home | Next |
| Drive.VolumeName | Up | DropShadow() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||