1

I would like to have help please with ExifTool, for the following operations:

  1. I have thousands of pictures scattered across dozens of sub-folders. All sub-folders are nested under a single parent folder, though. How do I tell ExifTool to apply the changes on all files?

  2. What I would like to do specifically is to "cut" each value under the "Copyright" EXIF tag, and "paste" it to the "UserComment" EXIF tag. I would like to this for all photos at once, and each photo has to keep its respective value (only now under a different tag), of course. Again, not all photos have a value in the "Copyright" field, I assume those will be ignored by the software.

  3. Finally, I would ExifTool to erase every possible metadata but the newly created values under the "Comments" tag.

Help and guidelines will be greatly appreciated.

Thanks!

1 Answer 1

3

Try this command:
exiftool -r -all:all= -tagsfromfile @ "-UserComment<Copyright" <DIR>

-r is the option to recurse into subdirectories
-all:all= will remove all metadata
-TagsFromFile @ copies tags listed after this option from the current file back into the file "-UserComment<Copyright" After the TagsFromFile, it will copy the Copyright but redirect it into the UserComment tag.

Make sure and test it first of course. This command will leave backup files with _original added to the extension. You can prevent this once you make sure that the command is correct by adding -overwrite_original.

8
  • Thanks @StarGeek! A few questions though: 1. Writing -all:al= before -tagsfromfile will not result first in loss of all metadata? (then ExifTool will not have any tags to copy). 2. I guess <DIR> is where I insert the parent folder's full directory?
    – voronoi
    Oct 4, 2017 at 2:46
  • 2
    It will still have all the data available as it figures out how to process the commands. It doesn't instantly toss all data when it gets the -all:all= option. It just doesn't write out all the data when it rewrites the file. Yes, <DIR> is the path to your target directory, whether it's the full path, a relative path, or just a dot . for the current directory.
    – StarGeek
    Oct 4, 2017 at 8:04
  • Thanks a lot @StarGeek, you command worked out beautifully (I changed the <> marks around DIR to quotation marks). At the end of the process, ExifTool said that: 17 image files unchanged 1 files weren't updated due to errors How can I check which files exactly were left unchanged or weren't updated (and due to what error exactly)? Thanks!
    – voronoi
    Dec 8, 2017 at 21:05
  • The file that had the error should have had an explanation in the output. Unchanged files would be files that either already had the all data stripped and no change to UserComment, or didn't have any data to strip and don't take EXIF metadata, like a BMAP file. Try redirecting the output into a file if there's more than you can read in the command line. Add -progress or -v2 to get more extensive information.
    – StarGeek
    Dec 8, 2017 at 21:23
  • Hi @StarGeek, I added the two commands you suggested. I still couldn't figure out what files were not processed, in either case. In both cases I copied the entire output to Notepad++ 1. Adding -progress after -r doesn't seem to make much of a difference in terms of output compared to your initial command. 2. -v2 after -r results in thousands of additional text lines, and without knowing specifically what to type in the search field, there's no way to find what I'm looking for. Is there a sure way to find what were the problematic files? Is there a recurring syntax in case of errors?
    – voronoi
    Dec 16, 2017 at 19:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .