Skip to main content

Set Finder Comment (script step reference)

Troi File Plug-in for FileMaker Pro

Set Finder Comment

Sets the Finder comment of a file (macOS only)

SyntaxScript step badge

Set Finder Comment [ Select ; Result (error) ; FilePath ; Comment text ]

Options

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

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 16 to FileMaker Pro 2023

Example

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.

Related functionsFunction badge

TrFile_GetFileAttribute
TrFile_SetFinderComment

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 2023 –> Set Finder Comment (filep7311) 2023-0601 16:32:39