Associated with either a collection or a WshUnnamed object.
The Item property returns a string. For collections, it returns an item based on the specified key.
The WshUnnamed argument items are stored in the order that they were included on the command line.
The quotes are removed in the WshUnnamed collection.
The following example demonstrates how the Item property can be used to return items in the WshUnnamed collection. In this example, two unnamed arguments are supplied to run a script. Inside the script, code causes the unnamed arguments to be output. The Item property is used to index into the unnamed arguments collection.
The following line is typed at the command prompt to run the script.
myScript.vbs arg1 arg2
When the following code is executed inside the script:
WScript.Echo WScript.Arguments.Unnamed.Item(0) WScript.Echo WScript.Arguments.Unnamed.Item(1)
the following output is produced: