Skip to main content

TrFile_SetFinderComment (function reference)

Troi File Plug-in > Functions reference > TrFile_SetFinderComment
Troi File Plug-in for FileMaker Pro

TrFile_SetFinderComment

Sets the the finder comment of a file (macOS only)

SyntaxFunction badge

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

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 functionsFunction badge

TrFile_GetFileAttribute
TrFile_SetFileAttribute

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 2023 –> TrFile_SetFinderComment (filep4311) 2023-0601 16:04:30