Set Finder Comment
Sets the Finder comment of a file (macOS only)
Set Finder Comment [ Select ; Result (error) ; FilePath ; Comment text ]
|Select entire contents||replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field|
|Result (error)||an error code|
|FilePath||the path to the file|
|Comment text||the text of the comment to set|
Data type returned
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.
Troi File Plug-in 9.0
FileMaker Pro 16 to 19
Set Finder Comment [ Select ; gErrorCode ; "Hard Disk:test.doc" ; "Hello Get Info!" ]
This step will set the macOS Finder comment of the file test.doc to “Hello Get Info!”.
You can see the set comment in the Finder, with File -> Get Info.