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…