Browse the docs

Set a file's Finder comment

Sets or adds to a file's Finder comment, which Spotlight searches.

Set the Finder comment of path to text

Details #

Writes the file's Finder comment. With mode append the text is added on a new line after the comment that is there.

Parameters #

ParameterTypeRequiredValuesWhat it does
intotextThe variable that receives the path.
modetextset (the default) or append.
pathtextThe file. Optional when a file trigger fired.
sourcetext
texttextThe comment. An empty text clears it.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Set a file's Finder comment
Do
  1. Set the Finder comment of “invoice.pdf” to “Filed by Switchboard”
Open in Switchboard to try it

Gotchas #

  • The comment is stored with the file, so it follows a copy of it.

  • In a dry run it changes nothing and says what it would do.

See also #

Get or set a file attribute