Microsoft® Windows® Script Host
Count Property
WSH Reference
Version 1

See Also                      Applies To


Description
Returns the number of enumerated items.
Syntax
object.Count
Parameters
Part Description
object The result of the EnumNetworkDrive or EnumPrinterConnections methods, or the object returned by the Arguments property.
Remarks
In JScript, the Count property is implemented as a method, not as a property (as it is in VBScript). Because of this, you must add a set of parentheses at the end of the statement when using Count in JScript, as in the following example:
objArgs.Count()
Example
The following example displays all command-line parameters in the Arguments collection:
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1	  
  WScript.Echo objArgs(I)	
Next