Commands
file update
Update a file or folder's metadata in a single request.
poly file update changes a file or folder's metadata — name, tags, rating, notes, indexing opt-out, or custom properties — in a single request. It never touches file bytes and never moves a file between folders; for that, use poly mv.
Usage
poly file update <TARGET>
TARGET accepts a local path inside the sync folder, a //-prefixed Poly path, a deep link, or a web URL — see How it Works for the full reference syntax. At least one mutation flag is required.
Flags
| Flag | Description |
|---|---|
--name <NAME> | Rename the file. Cannot contain /. |
--tag <TAG> | Add a tag. Repeatable. Prefix with a color, e.g. red:school — see Tags and Colors. |
--remove-tag <TAG> | Remove a tag. Repeatable. |
--rating <0.0-10.0> | Set the rating. Conflicts with --remove-rating. |
--remove-rating | Clear the rating. |
--notes <TEXT> | Set the notes field. Conflicts with --remove-notes. |
--remove-notes | Clear the notes field. |
--do-not-index | Opt the file out of search indexing. Conflicts with --do-index. |
--do-index | Opt the file back into search indexing. |
--set "<NAME|ID>=<VALUE>" | Set a custom property, by name or ID. Repeatable. |
--unset "<NAME|ID>" | Clear a custom property, by name or ID. Repeatable. |
Examples
# Rename a file
poly file update //Home/docs/draft.md --name final.md
# Add colored tags
poly file update //Home/docs/report.pdf --tag red:school --tag blue:urgent
# Remove a tag and set a rating
poly file update //Home/photos/sunset.jpg --remove-tag draft --rating 8.5
# Clear notes and opt out of indexing
poly file update //Home/docs/private.pdf --remove-notes --do-not-index
# Set a custom property
poly file update //Home/docs/report.pdf --set "reviewed=true"
# Combine multiple mutations in one request
poly file update //Home/docs/report.pdf --name report-v2.pdf --tag green:done --rating 9
Related
mv— move a file between folders (not covered byfile update).file write— change bytes instead of metadata.file history— see past updates to a file.- Tags and Colors — colored tag syntax and Finder tag sync.