# SortOrder

The **SortOrder** object is returned by the [**Format**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/format)**.manual\_sort\_order** property if [manual sort mode](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/sorting_and_grouping/manual_sorting) is active. It lets you query and modify the sort order.

| Method Name | **Arguments**                                                                 | Return Type                                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GetOrder    | \<string:name>                                                                | *object:*[**Vector**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/vector) | Returns a [**Vector**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/vector) of strings representing the current sort order of files in the folder. If multiple manual sort orders have been defined, you can provide the name of a specific sort order as an argument to this method. If called with no arguments it returns the current sort order by default. |
| SetOrder    | <p><<a href="vector"><strong>Vector</strong></a>:order><br>\<string:name></p> | *none*                                                                                                                            | You can pass this method a [**Vector**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/vector) of strings to change the sort order of the current folder. You can optionally provide the name of a sort order as the second parameter if you’ve got more than one sort order defined.                                                                             |
| ResetOrder  | \<string:name>                                                                | *none*                                                                                                                            | Resets the manual sort order to the currently selected sort order (e.g. if the file display header indicates that it is sorted by name, **ResetOrder** would reset to filename order). You can optionally provide the name of a sort order as the second parameter if you’ve got more than one sort order defined.                                                                                                     |
