Get Item Property [ Result ; Item ; Property ]
Get Item Property gives you system information about an external file, returning information such as creation, modification, type, extension, and size.
Parameter | Description |
---|---|
Result | A target field to receive any error. Will be left empty when there is no error. |
Item | Path to the item (file or folder) to get inquiry property of. |
Property | type of information requested. One of the properties from a list: “Access Date”, “Creation Date”, “Modification Date”, “Is Hidden”, “Is Directory”, “Data Size”, “Resource Size”, “Is Locked”, “Is Alias”, “Mac Type”, “Mac Creator”, “Parent Directory Path”, “File Name”, “OS Native Path”. |
Properties
The following properties are defined:
- “Access Date” – returns Date when the object was accessed last time.
- “Creation Date” – returns Date when the object was created.
- “Modification Date” – returns Date when the object was last time modified.
- “Is Hidden” – returns Boolean whether the object is invisible (True) in Finder or Windows Explorer, False otherwise.
- “Is Directory” – returns Boolean whether the object is a folder (True) or a file (False).
- “Is Alias” – returns Boolean whether the object is a macOS alias or Windows shortcut. If the object is a shortcut True is returned, False otherwise.
- “Is Locked” – returns whether the object is locked and cannot be written to.
- “Data Size” – returns size of an object in bytes, typically of a file.
- “Resource Size” – returns size of an object’s Resource Fork, if any.
- “Mac Type” – returns the macOS file type. This is typically a four-character identifier but since it can contain non-printable characters, an 8 hex characters are returned. If there is no Mac Type, 00000000 is returned.
- “Mac Creator” – return the macOS file creator. This is typically a four-character identifier but since it can contain non-printable characters, an 8 hex characters are returned. If there is no Mac Type, 00000000 is returned.
- “Parent Directory Path” – returns parent path to a filesystem path.
- “File Name” – returns file name from a filesystem path.
- “OS Native Path” – returns an operating system native path to a filesystem path.
Returns
This function returns content based on the type of information requested. For “Creation Date” and “Modification Date” the result is a Date. “Is Something” properties return a Boolean, “Something Size” properties return a Number, while everything else is a Text.
Examples
To get size of a file on the desktop named “wolf.jpg”:
Get Item Property [ Select; Result: MyTable::Response ; Item: “.D/wolf.jpg” ; Property: Data Size ]