Automated copying of Finder comments I have a bunch of old files in FLV format, which VLC will convert to M4V format while preserving the audio and video tracks (not re-encoding them).  Many of them have Finder comments that I want to copy to the new files, appending a note that it's converted.

I see that running:

mdls -raw -name kMDItemFinderComment "$f"

in bash will read the comments, but bash appears to have some trouble with non-ASCII characters.  I've tried xattr and an osascript command to apply the comment to the new file, but both are choking on the special characters (mostly bullet: •).

I even tinkered with making an AppleScript droplet to do it, but that's a mess too…

Any advice?
This AppleScript code works for me using the latest version of macOS Mojave.

set originalFile to (path to desktop as text) &amp; "Original.flv"
set convertedFile to (path to desktop as text) &amp; "Converted.m4v"

set appendTextToComment to " This File Has Been Converted"

tell application "Finder"
    set originalComment to comment of alias originalFile
    set comment of alias convertedFile to originalComment &amp; appendTextToComment
end tell


Obviously you need to change the file path variables to the location of your files and the appended text value to whatever you want