I'm looking for a script or any other way to automatically write the URL of a download file to its "Comments" field, as shown in a files Get Info sheet (Command+I in Finder).
Anyone know if I could make a script to do this, or if browser extensions can do this, etc?
Equally fine, for my needs anyway, would be to simply have the files Get Info sheet show me the URL in a separate field, i.e. one that displays whatever is in com.apple.metadata:kMDItemWhereFroms
Best Answer
I'm not sure what you mean by 'automatically' but this script will take the 'where froms' URL and stuff it into the Comments of (single) selected file's Finder Info window (i.e. when you type command-i on a file).
Essentially, this runs the 'mdls' command, greps the result for 'kMDItemWhereFroms' and then grabs the URL from that key's value, which is then set into the 'comments' field.
Some considerations: