# Items

The **Items** object lets you enumerate a collection of one or more [**Item**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/item) objects. An **Items** object is retrieved from a number of methods and properties, including [**Dialog**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dialog)**.Multi**, [**DOpus**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dopus)**.GetClip**, [**Command**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/command)**.files** and several others.

| Property Name      | Return Type                                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *collection:*[**item**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/item) | Returns a collection of [**item**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/item) objects that you can enumerate.                                                                                                                                                                                                                  |
| result             | *bool*                                                                                                                            | When this **Items** object comes from the [**Dialog**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dialog)**.Multi** method, it includes a **result** property giving the result of the dialog. The collection of items is only valid if **result** returns **True**. If it returns **False** it means the user cancelled the dialog. |

| Method Name  | **Arguments** | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------ | ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| RemoveNested | *none*        | *int*       | Removes any nested items from the collection (items that came from sub-folders rather than the root folder). The number of items removed is returned.                                                                                                                                                                                                                                                            |
| Update       | *none*        | *none*      | Updates the state of this object. This only applies to collections that come from certain sources (e.g. from a [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)). When the **Items** object is first retrieved, a snapshot is taken. Changes made after that outside of the script will not be detected unless you call the **Update** method. |
