Hi, I have a bunch of photos which I have tagged using the OS X native tags (these: https://support.apple.com/en-hk/HT202754)
I want to replace all metadata (exif, geotags, etc) with those from other files but keeping the OS X tag... I think I need to use "--tag" but I don't know how to identify the OS X tag... thanks in advance!
EDIT:
I tried the following...
1) copied all tags to FILE_A using --tagfromfiles
2) tagged FILE_A in OS X Finder
3) made copy of FILE_A named FILE_B
4) removed all tags from FILE_B (exiftool -all= FILE_B), at this point FILE_B still has the OS X tag
5) copied all tags to FILE_B again using --tagfromfiles, at this point FILE_B has lost the OS X tag
6) printed the exif data from both files (exiftool -g1 -a)
a comparison of the two is identical saved for the file name and several timestamp such as last modified...
any ideas?
Edit: Upon further reading your post, it actually occurs to me that you may actually want to try the -overwrite_original or -overwrite_original_in_place options first. See docs (http://www.exiftool.org/exiftool_pod.html#overwrite_original)
While I'm not familiar with Mac OS, it seems to me that these tags are a function of the underlying filesystem, not the metadata tags that ExifTool works with. That article uses an RTF file as an example, which I don't believe can support tag metadata, since it's basically a fancy text file. Also, the last paragraph implies that tags would be lost if you sent through mail, messages or other apps, which would not be the case if the tags were internal to the file.
I found this superuser post (http://superuser.com/questions/645827/how-does-maverickss-finder-store-tags) that says they are saved as an extended attribute, so it's not internal to the file.
Phil did recently release a version (https://exiftool.org/forum/index.php/topic,6923.msg34889.html#msg34889) that has some support for OS X metadata. Try the command in that post, exiftool -a -G1 -s -api MDItemTags, to see if it lists the tags you want and test to see if you can copy them.
Quote from: StarGeek on March 01, 2016, 04:12:38 AM
Phil did recently release a version (https://exiftool.org/forum/index.php/topic,6923.msg34889.html#msg34889) that has some support for OS X metadata. Try the command in that post, exiftool -a -G1 -s -api MDItemTags, to see if it lists the tags you want and test to see if you can copy them.
I updated exiftool and indeed see the following
[System] MDItemUserTags : Orange
So how can I use --tagfromfiles without getting this being overwritten? I tried the following but none of them worked...
exiftool -tagsfromfile SOURCE -all:all -x MDItemUserTags -ext jpg FILE
exiftool -tagsfromfile SOURCE -all:all --MDItemUserTags -ext jpg FILE
exiftool -tagsfromfile SOURCE -all:all -x System -ext jpg FILE
exiftool -tagsfromfile SOURCE -all:all --System -ext jpg FILE
Have you already tried to do this with -overwrite_original_in_place. That may work.
The problem is that even though Phil has enabled reading these special file system attributes, it can't write to them (yet), so if the file is newly created by exiftool (which it normally does), these attributes are lost.
Yes. As Hayo says, -overwrite_original_in_place should work to preserve this system information.
- Phil
Quote from: StarGeek on March 01, 2016, 04:12:38 AM
Edit: Upon further reading your post, it actually occurs to me that you may actually want to try the -overwrite_original or -overwrite_original_in_place options first. See docs (http://www.exiftool.org/exiftool_pod.html#overwrite_original)
Quote from: Hayo Baan on March 01, 2016, 06:41:52 AM
Have you already tried to do this with -overwrite_original_in_place. That may work.
The problem is that even though Phil has enabled reading these special file system attributes, it can't write to them (yet), so if the file is newly created by exiftool (which it normally does), these attributes are lost.
Quote from: Phil Harvey on March 01, 2016, 08:56:58 AM
Yes. As Hayo says, -overwrite_original_in_place should work to preserve this system information.
- Phil
-overwrite_original_in_place did work. thanks all!!
I had a bit of time to run some tests myself. As far as I can tell the OS X tags are preserved anyway, without requiring -overwrite_original_in_place. From your post I just assumed that these tags were lost when you wrote other metadata, but apparently this isn't the case:
> exiftool -ver
10.11
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
> exiftool a.jpg -artist=Phil
1 image files updated
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
> exiftool a.jpg -all=
1 image files updated
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
- Phil
Quote from: Phil Harvey on March 03, 2016, 07:19:43 AM
I had a bit of time to run some tests myself. As far as I can tell the OS X tags are preserved anyway, without requiring -overwrite_original_in_place. From your post I just assumed that these tags were lost when you wrote other metadata, but apparently this isn't the case:
> exiftool -ver
10.11
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
> exiftool a.jpg -artist=Phil
1 image files updated
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
> exiftool a.jpg -all=
1 image files updated
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
- Phil
I ran
exiftool -tagsfromfile SOURCE_DIR/%f.ARW -all:all -ext jpg JPG_DIR and that erased my OS X tags. SOURCE_DIR is just my SD card location..
Quote from: minovsky on March 03, 2016, 09:50:26 PM
I ran exiftool -tagsfromfile SOURCE_DIR/%f.ARW -all:all -ext jpg JPG_DIR and that erased my OS X tags. SOURCE_DIR is just my SD card location..
I tried this too:
> exiftool a.jpg -tagsfromfile ../pics/SonyILCE-7.arw -all:all
1 image files updated
> exiftool a.jpg -mditemusertags
MD Item User Tags : Orange
> exiftool -ver
10.11
> sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F1605
- Phil
Quote from: minovsky on March 03, 2016, 09:50:26 PM
I ran exiftool -tagsfromfile SOURCE_DIR/%f.ARW -all:all -ext jpg JPG_DIR and that erased my OS X tags. SOURCE_DIR is just my SD card location..
What file system is on the SD card? If it's being used for a digital camera, it might not be the Mac file system and may be able to completely support the Mac tags.
I don't think the SOURCE_DIR should matter, as long as the JPG_DIR is an HFS+ volume.
- Phil
Ah, my mistake. I read it as all taking place on the SD card