action:Get_File_Attribute
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| action:Get_File_Attribute [2019/03/21 19:13] – ADD section on Alias and SymLink JMichaelTX | action:Get_File_Attribute [2023/09/18 08:15] (current) – [File attributes available] peternlewis | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| The result of the action is displayed at the bottom of the action. | The result of the action is displayed at the bottom of the action. | ||
| + | |||
| + | ===== File attributes available ===== | ||
| + | |||
| + | {{page> | ||
| + | |||
| + | ===== Addition File Attributes ===== | ||
| + | |||
| + | There are several more attributes available using the [[action: | ||
| + | |||
| + | * Delete the the path extension. | ||
| + | * Expand Path to full page, replacing tilde (~) in the path. | ||
| + | * Resolve symlinks, or standardize the path. | ||
| + | |||
| ===== Using Alias and SymLink Files ===== | ===== Using Alias and SymLink Files ===== | ||
| Line 15: | Line 28: | ||
| {{: | {{: | ||
| - | If you want to determine if the Finder Item is an Alias or SymLink, you can use this AppleScript, | + | If you want to determine if the Finder Item is an Alias or SymLink, you can use this AppleScript, |
| ```applescript | ```applescript | ||
| Line 22: | Line 35: | ||
| set theItem to item 1 of theSel | set theItem to item 1 of theSel | ||
| set itemKindStr to (kind of theItem) as text | set itemKindStr to (kind of theItem) as text | ||
| + | | ||
| + | if (itemKindStr ≠ " | ||
| + | set itemFileType to (file type of theItem) as text | ||
| + | else | ||
| + | set itemFileType to " | ||
| + | end if | ||
| + | | ||
| + | if (itemKindStr = " | ||
| + | if (itemFileType = " | ||
| + | set itemKindStr to "Link: SymLink" | ||
| + | else | ||
| + | set itemKindStr to "Link: Alias" | ||
| + | end if | ||
| + | end if | ||
| + | | ||
| end tell | end tell | ||
| return itemKindStr | return itemKindStr | ||
| - | -->Alias | + | -->Link: Alias |
| + | -->Link: SymLink | ||
| + | --> | ||
| ``` | ``` | ||
| - | |||
| - | |||
| - | --- | ||
| - | |||
| - | ===== File attributes available ===== | ||
| - | |||
| - | *file type (r/o). | ||
| - | *file size (r/o). | ||
| - | *creation date. | ||
| - | *modification date. | ||
| - | *added date. | ||
| - | *last used date. | ||
| - | *downloaded date. | ||
| - | *where from. | ||
| - | *owner name (r/o). | ||
| - | *owner id (r/o). | ||
| - | *group name. | ||
| - | *group id. | ||
| - | *POSIX permissions. | ||
| - | *extension hidden. | ||
| - | *invisible. | ||
| - | *HFS creator code. | ||
| - | *HFS type code. | ||
| - | *content type. | ||
| - | *content kind. | ||
| - | *tags (set, add, remove or toggle). | ||
| - | *comment. | ||
| - | *parent path (r/o). | ||
| - | *file name (r/o). | ||
| - | *base name (r/o). | ||
| - | *extension (r/o). | ||
| - | |||
| - | ===== Addition File Attributes ===== | ||
| - | |||
| - | There are several more attributes available using the [[action: | ||
| - | |||
| - | * Get or delete the last path component or the path extension. | ||
| - | * Get the basename of the path (ie the name without directory or extension). | ||
| - | * Expand Path to full page, replacing tilde (~) in the path. | ||
| - | * Resolve symlinks, or standardize the path. | ||
| - | |||
| ===== See Also ===== | ===== See Also ===== | ||
| - | ---- | + | ==== Actions ==== |
| - | === Actions === | + | * [[Set File Attribute]] |
| - | + | * [[Filter]] | |
| - | * [[action:Set File Attribute|Set File Attribute]] | + | |
| - | * [[action: | + | |
| * [[: | * [[: | ||
| - | ---- | + | === Conditions === |
| + | |||
| + | * [[condition: | ||
| + | * [[condition: | ||
| + | * [[: | ||
| ==== Forum ==== | ==== Forum ==== | ||
action/Get_File_Attribute.1553195588.txt.gz · Last modified: by JMichaelTX
