Maybe i'm coming from wrong direction.....
I'm trying to find out what anything that comes after KDMItem if it refers to anything .... ie,, does WhereFroms refer to a tag name "Where from:" or what ? how does it get this tag if its not coded ? etc..
The name of the extended attribute is "com.apple.metadata:kMDItemWhereFroms". You may think that only "WhereFroms" is the tag or attribute, but this would be wrong. The simple fact is that Apple has defined an extended attribute with a name of "com.apple.metadata:kMDItemWhereFroms".
Use the -l option of the 'xattr' command to list all the extended attributes attached to a file.
I don't know of any comprehensive list of all possible xattr attribute names. The simple fact here is that an attribute name can be anything. There is a name-length limit, but I don't recall what it is. The man page entries for getxattr, setxattr, etc. may tell you. There are links to those man pages in the SEE ALSO section at the bottom of the link I posted above. You should probably read those so you understand exactly what an xattr is, and what its limitations are.
Apple has defined some xattr names, and other vendors may also use whatever they want. There isn't a central authority managing or assigning attribute names. There is a recommendation for defining your own names, but that's it.
The format of the com.apple.metadata:kMDItemWhereFroms data is a binary plist. You can google
binary plist to learn more.
Once i know this., i can adjust it to my needs. But its the only thing i'm stuck on.
I tried adjusting the WhereFroms to my own tag name, but noting happened..
What did you adjust it to? Post the exact command line you used. Also post the exact output, if any, including any error messages.
For example using shell script from code to delete "Author" tag in a music file. so I had KDMItemAuthor ,,
but it didn't work
Xattrs are not the only place that "extra info" or "metadata" is stored.
Images can have EXIF data stored in the file itself.
https://en.wikipedia.org/wiki/Exchangeable_image_file_format
MP3 and some other audio files can have ID3 tags stored in the file itself.
https://en.wikipedia.org/wiki/ID3
Other files may have additional forms, often stored in the file itself, but sometimes stored in the file's resource fork.
If you want to retrieve more extensive metadata for a file, you may be better off using the 'mdls' command, rather than 'xattr'.
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/mdls.1.html
'mdls' queries the Spotlight metadata, and Spotlight knows about ID3, EXIF, and other tagging formats. Spotlight extracts this metadata and stores it in a unified metadata store, the Spotlight database.
There is developer info on Spotlight queries.
https://developer.apple.com/library...tual/SpotlightQuery/Concepts/QueryFormat.html
You can also find examples by googling
spotlight queries.
One difference between Spotlight metadata and xattrs is that Spotlight metadata is read-only.
Xattrs can be set using command-line tools, such as changing or removing a "com.apple.metadata:kMDItemWhereFroms" attribute. However, you can't change or remove the Spotlight metadata except by changing the xattr on the file itself.
As another example, you can't change the Author tag for an audio file if that's stored in an ID3 tag. You'd need to obtain a command-line tool for changing ID3 tags. Such tools exist; you can google for them.