Trying to copy the comments of a file to macOS Finder tags

Hello,
I currently trying to sync my macOS Finder tags with the comments field of specific files with hazel.
Syncing tags to comments is pretty easy with the "add comment" command in hazel.
The other way around is not as easy. I am trying to workaround this with apple script, but I can't solve the error. I am using the command line tool tag in order to add tags to theFile (https://github.com/jdberry/tag)
Does anyone know what I am doing wrong or does anybody have an alternative solution?
Best
I currently trying to sync my macOS Finder tags with the comments field of specific files with hazel.
Syncing tags to comments is pretty easy with the "add comment" command in hazel.
The other way around is not as easy. I am trying to workaround this with apple script, but I can't solve the error. I am using the command line tool tag in order to add tags to theFile (https://github.com/jdberry/tag)
- Code: Select all
set the TheComment to the comment of theFile
do shell script "tag -a " & TheComment & " " & theFile
Does anyone know what I am doing wrong or does anybody have an alternative solution?
Best