Setting Spotlight metadata

I need to append Spotlight tag to every file in harddrive.

I know already this command:

tell application "Finder" to set comment of file something to "X"

I cant use Finder Comment field for this, so i try to find other way to do it.

For images i could use exiftool, but it would be better to use one method for all files in harddrive.

So i want to put some short text strings to “inside” any file type (pic/text/video/…) so Spotlight finds it. Kind of tags.


take a look at this article

I found this automator app very helpful…
For a selected folder, it will change the comments of all enclosed subfolders and files. Just be aware that if its a lot of files, it will take a while and meanwhile it will look like it’s not doing anything (but it is!).