# FileGroup

The **FileGroup** object exposes information about a file group (when the file display is set to group by a particular column). The [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)**.filegroups** property returns a collection representing the current file groups in that tab, and the [**Item**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/item)**.filegroup** property returns the current file group of a particular item.

Note: If you need to find which *file type group* a file is part of, rather than how the file is grouping based on currently visible columns, see the [FiletypeGroup](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/filetypegroup) object instead.

| Property Name      | Return Type                                                                                                                     | Description                                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *string*                                                                                                                        | Returns the name of the group.                                                                                                                                                                                    |
| collapsed          | *bool*                                                                                                                          | Returns **True** if the group is currently collapsed.                                                                                                                                                             |
| count              | *int*                                                                                                                           | Returns the number of items in this group. Note that groups can be empty; empty groups are not displayed in the file display but will still be returned by the **Tab.filegroups** property.                       |
| id                 | *int*                                                                                                                           | Returns the id number of this group. Id numbers are arbitrary - you shouldn't place any meaning on the actual value, but you can compare the id fields as an easy way to tell if two items are in the same group. |
| members            | *object:*[**Items**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/items) | Returns an [**Items**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/items) object that represents all the files and folders in this group.                 |
| type               | *string*                                                                                                                        | Returns a string indicating the collation type of the group.                                                                                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/filegroup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
