Removing all metadata except title author copyright and contact

Started by AlanX, January 22, 2023, 12:34:11 PM

Previous topic - Next topic

AlanX

Sorry, this is probably a pretty basic question that's been answered before.
I want to remove all metadata except title, author, copyright, copyright status and contact details, and write the files to a new folder. I want to process all images in all subfolders of the specified folder, and retain that file structure in/under the output folder.
I'm sure someone can save me oodles of time working out how to do this. Grateful for any pointers. Thanks.

StarGeek

Your basic command would be
exiftool -all= -TagsFromFile @ -TAG1 -TAG2 -TAG# /path/to/files/

Replace TAG1,TAG2, TAG#, etc with the names of the tags that you want to keep.

The data you want to keep could be stored in multiple locations, so you'll have to use the command in FAQ #3 to figure out the actual names of the tags you want to keep.

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

AlanX

Many thanks, StarGeek. So much to read, so little time!! Really appreciate your help.
I take your point about multiple locations for some data. But the most important thing for me is removing the camera data and 'personalised' fields like Description, Keywords, etc, for which your script works fine, and I can always adjust to taste now I've got the hang of it.
I think I can forego the luxury of sending the new files to a different folder (so not renaming the _originals), and also the luxury of processing all sub-folders in one hit. So I have a working solution. Thanks again.

AlanX

Thought I'd try the recursive option, but can't get it to work. I have a parent folder with all of my images in 30 sub-folders.

I've tried
C:\exiftool -r -all= -TagsFromFile @ -Creator -Copyright "D:\images-top-folder\*.jpg"
and
C:\exiftool -r -all= -TagsFromFile @ -Creator -Copyright "D:\images-top-folder\*\*.jpg"

I've tried this as a .bat and in the command line. What am I doing wrong?

StarGeek

This is Common Mistake #2c.  From the docs on the -r (-recurse) option
   Only meaningful if FILE is a directory name

You want to pass it just the directory name, no wildcards, and use the -ext (-extension) option to limit processing to just jpgs.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

AlanX