# OnFileOperationComplete

The **OnFileOperationComplete** event can be implemented by a [script add-in](../../../scripting/script_add-ins) to receive notification when certain file operations have been completed. Currently the only file operation that supports this is the **Rename** command, but others may be added in the future.&#x20;

Receiving notifications is a two-step process. Opus will initially call your script to query whether you want notification for a particular operation. If you respond affirmatively, your script will be called again when the operation is complete.

| **Method Name:**   | OnFileOperationComplete                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**FileOperationCompleteData**](../scripting_objects/fileoperationcompletedata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Return Type:**   | When the **query** property is set to **True**, return **True** to indicate that you want to be notified for this operation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Description:**   | <p>The first time this method is called the <a href="../scripting_objects/fileoperationcompletedata"><strong>FileOperationCompleteData</strong></a><strong>.query</strong> property will be set to <strong>True</strong>. You can look at the <strong>action</strong> and <strong>cmdline</strong> properties to decide if this is an operation you want notification for. Return <strong>True</strong> if so.</p><p>You'll then be called again with the <strong>query</strong> property set to <strong>False</strong>. The <strong>data</strong> property provides information about the operation that was completed.</p> |
