Last active
April 18, 2020 10:52
-
-
Save simonbs/9a7f885d5b2f4941cc27134a8fe544a7 to your computer and use it in GitHub Desktop.
Adds a tag to a file. To be used with Shortcuts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tag = args.shortcutParameter | |
let fm = FileManager.iCloud() | |
let filePath = args.fileURLs[0] | |
fm.addTag(filePath, tag) | |
let tags = fm.allTags(filePath) | |
let output = {"tags": tags} | |
Script.setShortcutOutput(output) | |
Script.complete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment