# OnAfterFolderChange

The **OnAfterFolderChange** event can be implemented by a [script add-in](https://chaoses-ib.gitbook.io/directory-opus/manual/scripting/script_add-ins) that wants to be notified after a new folder has been read in a tab. Use the [**OnBeforeFolderChange**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_events/onbeforefolderchange) event to receive notification *before* the folder is read.

| **Method Name:**   | OnAfterFolderChange                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**AfterFolderChangeData**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/afterfolderchangedata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Return Type:**   | *bool*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Description:**   | <p>The <strong>AfterFolderChangeData.tab</strong> property indicates the tab and the <strong>path</strong> property the path of the folder. The <strong>result</strong> property indicates the success or failure of the folder read.</p><p>If <strong>result</strong> is <strong>False</strong> (i.e. the folder was not successfully read) then you can return <strong>True</strong> from this event to stop Opus from going back to the previous folder (which is what normally happens when a folder read fails). If <strong>result</strong> is <strong>True</strong> then the return value from this event is ignored.</p> |
