I second this.
It should be written up how we can use the script when the target file is not one single current file.
But I’m curious, how you’d pick the files you’d want tagged? Because if it’s a manual thing, you can set to a hotkey a script that adds a tag, like my example here.
If you’d pick the files from a Dataview query, apparently the File Cooker plugin can be used to add the results to a folder and then the Multi Properties plugin can be used to add a tag to that folder…which is not exactly good if you don’t know how to put the files back again to the original folders (so one would need to make some safety measures there, or use the Projects plugin as mentioned here, which again is not ideal as tags I seem to remember are overwritten).
So yeah, I’d like for there to be a tutorial of some sort using that method, if Feralflora or anyone else is game.