> 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/item.md).

# Item

The **Item** object represents a file or folder displayed in a tab. You can obtain a collection of **Item** objects from the various methods of the [**Tab**](/directory-opus/manual/reference/scripting_reference/scripting_objects/tab.md) object. A collection of **Item** objects is also used with the [**Command**](/directory-opus/manual/reference/scripting_reference/scripting_objects/command.md) object to specify the files or folders a command should operate on. Using the [**FSUtil**](/directory-opus/manual/reference/scripting_reference/scripting_objects/fsutil.md)**.ReadDir** method to enumerate the contents of a folder also returns an **Item** object. You can create an **Item** from a file path using the [**FSUtil**](/directory-opus/manual/reference/scripting_reference/scripting_objects/fsutil.md)**.GetItem** method.

| Property Name      | Return Type                                                                                                                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *string*                                                                                                                                                                                                    | Returns the full pathname of the item (i.e. path plus filename).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| access             | *date*                                                                                                                                                                                                      | Returns the "last accessed" date, in local time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| access\_utc        | *date*                                                                                                                                                                                                      | Returns the "last accessed" date, in UTC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| attr               | *int*                                                                                                                                                                                                       | <p>Returns the item attributes. This value is a series of flags that are logically OR'd together. The attributes supported by Opus are:</p><p>Using the <strong>fileattr</strong> property, which returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/fileattr.md"><strong>FileAttr</strong></a> object, may be easier than dealing with the raw attribute flags.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|                    |                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 1                  | read only                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 2                  | hidden                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 4                  | system                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 32                 | archive                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 1024               | reparse point (junctions, etc.)                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 2048               | compressed                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 4096               | offline storage                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 8192               | not content-indexed                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 16384              | encrypted                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 524288             | pinned                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| attr\_text         | *string*                                                                                                                                                                                                    | Returns the item attributes as a string, as displayed in the file display.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| checked            | *bool*                                                                                                                                                                                                      | Returns **True** if the item was checked (in [checkbox mode](/directory-opus/manual/basic_concepts/selecting_files/selecting_with_the_mouse_and_keyboard/checkbox_mode.md)), or **False** otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| create             | *date*                                                                                                                                                                                                      | Returns the "creation" date, in local time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| create\_utc        | *date*                                                                                                                                                                                                      | Returns the "creation" date, in UTC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| current            | *bool*                                                                                                                                                                                                      | <p>For <strong>Item</strong> objects obtained from a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/viewer.md"><strong>Viewer</strong></a>, this property is <strong>True</strong> if the item represents the currently displayed image and <strong>False</strong> otherwise.</p><p>For <strong>Item</strong> objects obtained from a file display, the property indicates whether or not the item is the one with focus. The <strong>focus</strong> property is the more proper way to check this, but both work in case you forget which is which.</p>                                                                                                                                                                                                                                                                                                                        |
| display\_name      | *string*                                                                                                                                                                                                    | Returns the display name of the item. Only a few items have a display name that is different to their actual name - some examples are certain system folders (like *C:\Users* which might have a translated display name in non-English locales).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ext                | *string*                                                                                                                                                                                                    | Returns the filename extension.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ext\_m             | *string*                                                                                                                                                                                                    | Returns the filename extension, taking multi-part extensions into account. For example, a file called "file.part1.rar" might return ".rar" for **ext** but ".part1.rar" for **ext\_m**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| failed             | *bool*                                                                                                                                                                                                      | Returns **True** if the item failed when used by a command. This is only meaningful in conjunction with the [**Command**](/directory-opus/manual/reference/scripting_reference/scripting_objects/command.md)**.files** collection - once the command has returned, this property will indicate success or failure on a per-file basis.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| fileattr           | *object:*[**FileAttr**](/directory-opus/manual/reference/scripting_reference/scripting_objects/fileattr.md)                                                                                                 | Returns a [**FileAttr**](/directory-opus/manual/reference/scripting_reference/scripting_objects/fileattr.md) object that represents the item's attributes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| filegroup          | *object:*[**FileGroup**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filegroup.md)                                                                                               | <p>If the file display this item came from is grouped by a particular column, this property returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/filegroup.md"><strong>FileGroup</strong></a> object representing the group the item is in. If the item has no group this will return an empty string.</p><p>This property is about grouping the file display by one of its columns. If you're looking for <em>file type groups</em>, see the <strong>groups</strong> and <strong>groupsobject</strong> properties, just below.</p>                                                                                                                                                                                                                                                                                                                                         |
| focus              | *bool*                                                                                                                                                                                                      | <p>For <strong>Item</strong> objects obtained from a file display, this property is <strong>True</strong> if the object represents the item with focus, and <strong>False</strong> otherwise. Only one item can have focus at a time. The item with focus is typically shown with an outline around it, and is usually the last item which was clicked on, or which was moved to with the keyboard. The item with focus is often also one of the selected items, but not always; selection and focus are two separate things.</p><p>For <strong>Item</strong> objects obtained from a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/viewer.md"><strong>Viewer</strong></a>, the property indicates if the file is the one currently shown in the viewer. The <strong>current</strong> property is the more proper way to test this, but <strong>focus</strong> also works.</p> |
| got\_size          | *bool*                                                                                                                                                                                                      | Returns **True** for folder items if their size has been calculated by, for example, the [**GetSizes**](/directory-opus/manual/reference/command_reference/internal_commands/getsizes.md) command. If **False**, the **size** property will be unreliable for folders.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| groups             | [**Vector**](/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md):[**FiletypeGroup**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filetypegroup.md) | <p>Returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md"><strong>Vector</strong></a> of <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/filetypegroup.md"><strong>FiletypeGroup</strong></a> objects representing any and all file type groups that this file is a member of.</p><p>If you only want to check membership of a particular file type group, see the <strong>InGroup</strong> method in the section below.</p><p>If you're looking for information on how the file display is grouping this file based on one of the displayed columns, see the <strong>filegroup</strong> property, just above.</p>                                                                                                                                                                                                                 |
| groupsobject       | *object:*[**FiletypeGroups**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filetypegroups.md)                                                                                     | Similar to the groups property, except a [**FiletypeGroups**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filetypegroups.md) object is returned instead of a [**Vector**](/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| highlighted        | *object:*[**HighlightedColumns**](/directory-opus/manual/reference/scripting_reference/scripting_objects/highlightedcolumns.md)                                                                             | <p>Returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/highlightedcolumns.md"><strong>HighlightedColumns</strong></a> object that lets you enumerate any <a href="/directory-opus/manual/basic_concepts/selecting_files/selecting_cells.md">selected cells</a> belonging to this item.</p><p>This only applies if the item was retrieved from a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/tab.md"><strong>Tab</strong></a>. Normally you would use this in a script run from the <strong>Copy Highlighted Cells</strong> context menu.</p>                                                                                                                                                                                                                                                                                           |
| id                 | *int*                                                                                                                                                                                                       | This is a unique ID for the item; it is used internally by Opus.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| is\_dir            | *bool*                                                                                                                                                                                                      | Returns **True** if the item represents a folder, and **False** for a file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| is\_junction       | *bool*                                                                                                                                                                                                      | Returns **True** if the item is a junction to another folder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| is\_reparse        | *bool*                                                                                                                                                                                                      | Returns **True** if the item is a reparse point.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| is\_symlink        | *bool*                                                                                                                                                                                                      | Returns **True** if the item is a symbolic link.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| metadata           | *object:*[**Metadata**](/directory-opus/manual/reference/scripting_reference/scripting_objects/metadata.md)                                                                                                 | Returns a [**Metadata**](/directory-opus/manual/reference/scripting_reference/scripting_objects/metadata.md) object that provides access to the item's metadata.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| modify             | *date*                                                                                                                                                                                                      | Returns the "last modified" date, in local time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| modify\_utc        | *date*                                                                                                                                                                                                      | Returns the "last modified" date, in UTC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| name               | *string*                                                                                                                                                                                                    | Returns the name of the item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| name\_stem         | *string*                                                                                                                                                                                                    | Returns the filename "stem" of the item. This is the name of the item with the filename extension removed. It will be the same as the **name** for folders.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| name\_stem\_m      | *string*                                                                                                                                                                                                    | Returns the filename "stem" of the item, taking multi-part extensions into account. For example, a file called "file.part1.rar" might return "file.part1" for **name\_stem** but "file" for **name\_stem\_m**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| nested             | *bool*                                                                                                                                                                                                      | Returns **True** if the item was in an expanded sub-folder, **False** if it was in the root of the folder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| path               | *object:*[**Path**](/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md)                                                                                                         | Returns the path of the item's parent folder. This does not include the name of the item itself, which can be obtained via the **name** property.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| realpath           | *object:*[**Path**](/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md)                                                                                                         | Returns the "real" path of the item. For items located in [virtual folders](/directory-opus/manual/preferences/preferences_categories/folders/virtual_folders.md)like [Libraries](/directory-opus/manual/basic_concepts/virtual_file_system/libraries.md) or [Collections](/directory-opus/manual/basic_concepts/virtual_file_system/file_collections.md), this lets you access the item's underlying path in the real file system. The **realpath** property includes the full path to the item, including its own name.                                                                                                                                                                                                                                                                                                                                                                                        |
| selected           | *bool*                                                                                                                                                                                                      | Returns **True** if the item was selected, or **False** otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| shortpath          | *object:*[**Path**](/directory-opus/manual/reference/scripting_reference/scripting_objects/path.md)                                                                                                         | Returns the short path of the item, if it has one. Note that short paths are disabled by default in Windows 10.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| size               | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md)                                                                                                 | Returns the size of the item as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

|        |                                 |
| ------ | ------------------------------- |
| 1      | read only                       |
| 2      | hidden                          |
| 4      | system                          |
| 32     | archive                         |
| 1024   | reparse point (junctions, etc.) |
| 2048   | compressed                      |
| 4096   | offline storage                 |
| 8192   | not content-indexed             |
| 16384  | encrypted                       |
| 524288 | pinned                          |

| Method Name | **Arguments**                                                                                                              | Return Type                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| InGroup     | \<string:group>                                                                                                            | *bool*                                                                                                  | <p>Tests the file for membership of the specified file type group.</p><p>Each file type group has two names: An internal name which is always the same in all languages, and a display name which may be translated differently for each language. The display name is what you see in the File Types editor. Groups that come pre-defined when you install Opus have internal names like <em>"Archives"</em> and <em>"Music"</em> (which are also their English display names). User-defined groups have internal names which are unique, automatically generated GUID strings like <em>"{C4B716ED-2A9C-43C6-B325-7DADDEEFADA9}"</em>.</p><p>The <em>group</em> argument should be the name of the group you wish to test against, e.g. <em>"Music"</em>.</p><p>By default, both the internal name and the display name are checked, and a match on either will return true. Prefix the <em>group</em> argument with <em>"name:"</em> to restrict the search to internal names, or with <em>"disp:"</em> to restrict the search to display names.</p><p>To get a list of all file type groups which the file matches, use the <strong>groups</strong> property instead (see the section above).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Labels      | <p>\<string:category><br>\<string:flags></p>                                                                               | [**Vector**](/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md):*string* | <p>This method returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md"><strong>Vector</strong></a> of strings representing any <a href="/directory-opus/manual/file_operations/labels.md">labels</a> that have been assigned to the item.</p><p>Both arguments are optional. The first is a <a href="/directory-opus/manual/reference/wildcard_reference/pattern_matching_syntax.md">wildcard pattern</a> that lets you filter the returned labels based on their category. For example, pass <em>"Status"</em> to only retrieve a list of status icons assigned to a file.</p><p>The second optional argument contains flags keywords that control how the labels are returned. The only defined flag is <em>"explicit"</em> - if specified, wildcard and label filters will not be considered - only explicitly assigned labels will be returned. Note that if you want to provide the second argument but don't want to filter by category you should pass <em>"\*"</em> for the first argument to match all categories.</p><p>If explicit labels aren't requested, any global wildcard/filter labels will be returned, along with any per-folder labels configured for the item's folder. Per-folder <em>content type</em> and <em>folder type</em> labels, however, are not currently returned by this function.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| MatchFilter | <p>\<object:filter><br>or \<string:filter></p>                                                                             | *bool*                                                                                                  | <p>Returns <strong>True</strong> if the item matches the specified filter. The <em>filter</em> argument must be a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/filter.md"><strong>Filter</strong></a> object created by the <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/dopusfactory.md"><strong>DOpusFactory</strong></a><strong>.NewFilter</strong> method.</p><p>You can also pass a <a href="/directory-opus/manual/reference/textual_filters.md">textual filter</a> in string form, to parse the filter and compare the item in one operation, although if you're comparing multiple items it would be much more efficient to create the <strong>Filter</strong> first.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Open        | <p>\<string:mode><br>\<object:window></p>                                                                                  | *object:*[**File**](/directory-opus/manual/reference/scripting_reference/scripting_objects/file.md)     | <p>Opens this file and returns a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/file.md"><strong>File</strong></a> object that lets you access its contents as binary data.</p><p>By default the file will be opened in <em>read mode</em> - specify <em>"w"</em> for the optional <em>mode</em> parameter to open the file in <em>write mode.</em> Note that you cannot both read and write with the same <strong>File</strong> object.</p><p>When opening in write mode, you can also specify optional flags that control how the file is opened:</p><p>When using write mode, you may add <em>f</em> (force) to any of the above mode strings to tell Opus to clear the read-only file attribute if it blocks modifying an existing file; otherwise, attempting to open a read-only file for writing will fail. For example, <em>"wof"</em> is like <em>"wo"</em> mode but also clears the read-only attribute.</p><p>If you only want to make changes to the file's attributes without modifying its data you can also specify <em>"m"</em> to open it in <em>modify mode</em>.</p><p>The optional <em>window</em> parameter lets you associate the <strong>File</strong> object with a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/tab.md"><strong>Tab</strong></a> or a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/lister.md"><strong>Lister</strong></a>, which will be used if Opus needs to display any dialogs (e.g. a UAC elevation dialog). You may also specify the string "NoElevate" to prevent UAC elevation entirely, or "ElevateNoAsk" to prevent UAC prompts while still gaining elevation if something else has already performed it.</p><p>A <strong>File</strong> object is always returned, even if the file could not be opened. Check <strong>File.error</strong> on the returned object immediately after creating it to see if opening the file succeeded. Even if the file was not be opened, some of the object's methods may still work. For example, if a file doesn't exist then you can't open it or set its attributes, but permissions on an existing file may allow you to set its attributes while blocking you from modifying it or vice versa.</p> |
|             |                                                                                                                            |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| wc          | create a new file, only if it doesn't already exist.                                                                       |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| wa          | create a new file, always. If the file already exists it will be overwritten. (This is the default.)                       |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| we          | open existing file. The file will not be created if it doesn't already exist.                                              |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| wo          | open existing file. If the file doesn't exist it will be created.                                                          |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| wt          | truncate existing file. If the file exists it will be truncated. The file will not be created if it doesn't already exist. |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| d           | delete-on-close.                                                                                                           |                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ShellProp   | <p>\<string:property><br>\<string:type></p>                                                                                | *variant*                                                                                               | <p>Returns the value of the specified shell property for the item. The property argument can be the property's PKEY or its name.</p><p>If you provide a name then the optional second argument lets you control how the properties are looked up by name. If the value of <em>type</em> is "R" then the first property whose raw name matches the supplied name will be used. If the value is "D" then the first property whose display name matches the supplied name will be used. If <em>type</em> is omitted then both raw and display names can match.</p><p>Note that if a shell property is returned by the system as a SAFEARRAY type, it will be converted automatically to a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md"><strong>Vector</strong></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Update      | *none*                                                                                                                     | *none*                                                                                                  | Updates the **Item** object from the file on disk. You might use this if you had run a command to change an item's timestamp or attributes, and wanted to retrieve the new information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

|    |                                                                                                                            |
| -- | -------------------------------------------------------------------------------------------------------------------------- |
| wc | create a new file, only if it doesn't already exist.                                                                       |
| wa | create a new file, always. If the file already exists it will be overwritten. (This is the default.)                       |
| we | open existing file. The file will not be created if it doesn't already exist.                                              |
| wo | open existing file. If the file doesn't exist it will be created.                                                          |
| wt | truncate existing file. If the file exists it will be truncated. The file will not be created if it doesn't already exist. |
| d  | delete-on-close.                                                                                                           |
