# BeforeFolderChangeData

If a [script add-in](https://chaoses-ib.gitbook.io/directory-opus/manual/scripting/script_add-ins)implements the [**OnBeforeFolderChange**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_events/onbeforefolderchange) event, the method receives a **BeforeFolderChangeData** object before the new folder is read.

| Property Name | Return Type                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| action        | *string*                                                                                                                      | <p>Returns a string indicating the action that triggered the folder read. The string will be one of the following: <em>normal</em>, <em>refresh</em>, <em>refreshsearch</em>, <em>refreshsub</em>, <em>parent</em>, <em>root</em>, <em>back</em>, <em>forward</em>, <em>dblclk</em>.<br>The <em>refreshsub</em> actions means the folder (and sub-folders) are being refreshed while Flat View is on. The other action names should be self-explanatory.</p> |
| initial       | *bool*                                                                                                                        | Returns **True** if this is the first path to be read into this tab (i.e. previously the tab was empty).                                                                                                                                                                                                                                                                                                                                                     |
| path          | *object:*[**Path**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/path) | Returns a [**Path**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/path) object representing the new path that is to be read.                                                                                                                                                                                                                                                                          |
| qualifiers    | *string*                                                                                                                      | <p>Returns a string indicating any qualifier keys that were held down by the user when the event was triggered.<br>The string can contain any or all of the following: <em>shift</em> <em>ctrl</em>, <em>alt</em>, <em>lwin</em>, <em>rwin</em><br>If no qualifiers were down, the string will be: <em>none</em></p>                                                                                                                                         |
| tab           | *object:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)   | Returns a [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) object representing the tab that is changing folder.                                                                                                                                                                                                                                                                            |


---

# 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/beforefolderchangedata.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.
