TrFile_SetFinderComment |
Sets the the finder comment of a file (macOS only)
Syntax
TrFile_SetFinderComment ( switches ; filePath ; comment )
Parameters
switches | not used, reserved for future use. Leave blank or put "-Unused" |
filePath | the path to the file |
comment | the text of the comment to set |
Returned Result
Data type returned
Error code
Result
The returned result is an error code. An error always starts with 2 dollars, followed by the error code. You should always check for errors. Returned error codes can be:
0 | no error | The comment was set |
$$-43 | fnfErr | File not found |
$$-50 | paramErr | There was an error with the parameter |
Other errors may be returned.
Originated in
Troi File Plug-in 9.0
Compatibility
FileMaker Pro 17 to FileMaker Pro 21 (2024)
Example
Set Field [ result ; TrFile_SetFinderComment ( "-unused" ; "Hard Disk:test.doc"; "Hello Get Info!" ) ]
This command will set the macOS Finder comment of a test.doc to “Hello Get Info!”.
You can see the set comment in the Finder, with File -> Get Info.1
Used in example file
Attribute.fmp12
Related functions
TrFile_GetFileAttribute |
TrFile_SetFileAttribute |
Related topics
Troi File Plug-in online help (overview)