Trying to add the "Where from" metadata in the Finder's "Get info" section of a picture on the Desktop and I am not able to since the text has special characters.
In this case, it is "?" and "=" that are present in "theURL_1". As you can see, I have removed these characters on "theURL_2" and it works just fine.
What would be the solution to include the full URL in the metadata?
set theFile to POSIX path of (path to desktop folder) & "cat.jpg" set theURL_1 to "https://www.youtube.com/watch?v=EtH9Yllzjcc" set theURL_2 to "https://www.youtube.com/watchvEtH9Yllzjcc" do shell script "xattr -w 'com.apple.metadata:kMDItemWhereFroms' " & quoted form of theURL_1 & space & quoted form of theFile