How to remove “Where from” information from downloaded .mkv file
metadatamojave
I have downloaded an .mkv files from Safari. When I open "Info" in Finder on the file, I see the following link to where it was downloaded from:
How can I remove that metadata from the file?
Best Answer
The link listed in "Where from" is stored as an extended attribute named "com.apple.metadata:kMDItemWhereFroms" on the file in the file system - it is not actually saved within the .mkv file itself.
You can remove it by opening Terminal.app and running the following command:
where filename.mkv is to be replaced with the actual path and name of the file. The easiest way to do that is simply to write the first part of the command, and then drag the .mkv file into the Terminal.app window.
It's stored in an extended attribute on the file. Specifically the com.apple.metadata:kMDItemWhereFroms attribute. It may stay with the file when you move it to different computers, but it depends on the filesystem or file sharing protocol you use. If you move it to another Mac on an HFS+ disk, it will likely keep it, but not necessarily if you transfer over the network, and most likely not with an external disk with a non-HFS+ filesystem.
You can check a file by running xattr -lp com.apple.metadata:kMDItemWhereFroms myfile in the Terminal, or remove it with xattr -d com.apple.metadata:kMDItemWhereFroms my file. ls -l@ flag is also useful; it will list the names of xattrs along with the usual ls information.
Best Answer
The link listed in "Where from" is stored as an extended attribute named "com.apple.metadata:kMDItemWhereFroms" on the file in the file system - it is not actually saved within the .mkv file itself.
You can remove it by opening Terminal.app and running the following command:
where
filename.mkv
is to be replaced with the actual path and name of the file. The easiest way to do that is simply to write the first part of the command, and then drag the .mkv file into the Terminal.app window.