> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/favorite.md).

# Favorite

A **Favorite** object represents a [favorite folder](/directory-opus/manual/basic_concepts/the_lister/navigation/favorites.md). It is retrieved by enumerating or indexing the [Favorites](/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites.md)object.

| Property Name      | Return Type                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *string*                                                                                            | Returns the name of the favorite folder or sub-folder.                                                                                                                                                                                                                                                                                                                                                                                         |
| folder             | *bool*                                                                                              | <p>Returns <strong>True</strong> if this is a sub-folder, <strong>False</strong> if it's a favorite folder or separator.</p><p>If this object is a sub-folder it also behaves like a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites.md"><strong>Favorites</strong></a> object as well as a <strong>Favorite</strong> object, and can be enumerated and have elements added and removed from it.</p> |
| separator          | *bool*                                                                                              | Returns **True** if this is a separator.                                                                                                                                                                                                                                                                                                                                                                                                       |
| path               | *object:*[**Path**](/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md) | Returns the path this favorite folder refers to as a [**Path**](/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md) object.                                                                                                                                                                                                                                                                                        |

| Method// Name// | **Arguments**                                                                                                                                            | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SetHeading      | \<string:heading>                                                                                                                                        | *none*      | <p>If this is a separator (i.e. the <strong>separator</strong> property returns <strong>True</strong>) this lets you make the separator into a heading, or change the heading text.</p><p>Note that changes you make to the list are not saved until you call the <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites.md"><strong>Favorites</strong></a><strong>.Save</strong> method.</p> |
| SetName         | \<string:name>                                                                                                                                           | *none*      | Changes the name of this favorite folder. Note that changes you make to the list are not saved until you call the [**Favorites**](/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites.md)**.Save** method.                                                                                                                                                                                          |
| SetPath         | <p>\<string:path> or<br>\<object:<a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md"><strong>Path</strong></a>></p> | *none*      | Changes the path this favorite folder refers to. Note that changes you make to the list are not saved until you call the [**Favorites**](/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites.md)**.Save** method.                                                                                                                                                                                   |
