Returns the WshNamed object (a collection of named arguments).
Parameters
- Object
-
WshArguments object.
Remarks
Example
The following code displays the number of named and unnamed command-line arguments.
| Copy Code |
---|
<package>
<job id="JS">
<script language="JScript">
var argsNamed = WScript.Arguments.Named;
var argsUnnamed = WScript.Arguments.Unnamed;
WScript.Echo("There are " + argsNamed.length + " named arguments.");
WScript.Echo("There are " + argsUnnamed.length + " unnamed arguments.");
</script>
</job>
<job id="VBS">
<script language="VBScript">
Dim argsNamed, argsUnnamed
Set argsNamed = WScript.Arguments.Named
Set argsUnnamed = WScript.Arguments.Unnamed
WScript.Echo "There are " & argsNamed.Count & " named arguments."
WScript.Echo "There are " & argsUnnamed.Count & " unnamed arguments."
</script>
</job>
</package> |
See Also