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:
Property | Returns |
---|---|
Access Date | Date when the object was accessed last time. |
Creation Date | Date when the object was created. |
Modification Date | Date when the object was last time modified. |
Is Hidden | Boolean whether the object is invisible (True) in Finder or Windows Explorer, False otherwise. |
Is Directory | Boolean whether the object is a folder (True) or a file (False). |
Is Alias | Boolean whether the object is a macOS alias or Windows shortcut. If the object is a shortcut True is returned, False otherwise. |
Is Locked | Whether the object is locked and cannot be written to. |
Data Size | Size of an object in bytes, typically of a file. |
Resource Size | Size of an object’s Resource Fork, if any. |
Mac Type | 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 | 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 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 ]