Browse the docs

Add Finder tags to a file

Adds, removes, sets or toggles a file's Finder tags.

Add tags tags to path

Details #

Changes the file's Finder tags. op is add (the default), remove, set (replace them all) or toggle. tags is a list, or names separated by commas or new lines. A tag the file already has keeps its colour.

Parameters #

ParameterTypeRequiredValuesWhat it does
intotextThe variable that receives the path.
optextadd, remove, set or toggle.
pathtextThe file. Optional when a file trigger fired.
sourcetext
tagsany valueThe tag names. Required except with set, where none clears the tags.

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

Examples #

Add Finder tags to a file
Do
  1. Add tags “Invoice, To file” to “invoice.pdf”
Open in Switchboard to try it

Gotchas #

  • The run's file.tags is updated, so a later condition sees the new tags.

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

See also #

Get or set a file attribute, Set a file's color label