TrFile_SetFinderComment (function reference)

By January 1, 2021January 26th, 2021Online Help, Troi File Plug-in
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 (Mac OS 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 19

Example

Set Field [ result ; TrFile_SetFinderComment ( "-unused" ; "Hard Disk:test.doc"; "Hello Get Info!" ) ]

This command will set the Mac OS Finder comment of a test.doc to “Hello Get Info!”.
You can see the set comment in the Finder, with File -> Get Info.

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 19 –> TrFile_SetFinderComment (filep4311) 2021-0126 11:34:02