Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
WshCollection Object
Count Method
Property: WshCollection.length
object.
length
The
length
property is read only and returns a Long
value which is
the number of items in the collection.
The following JScript code uses the
length
property to set up a loop over the list of current network drives.
Code:
WshNetwork = WScript.CreateObject("WScript.Network")
clDrives = WshNetwork.EnumNetworkDrives()
for (i=0; i<clDrives.length; i++)
{
WScript.Echo(clDrives(i))
}
Output:
P:
\\FileServer\public
Q:
\\FileServer\upload
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information