ExifTool Forum

ExifTool => Newbies => Topic started by: happygun on March 15, 2013, 05:52:22 AM

Title: Batch edit the camera model for a folder
Post by: happygun on March 15, 2013, 05:52:22 AM
Hi all,

not too hot with command line utilities. How do i batch edit the camera model for all nef files in a folder?
Title: Re: Batch edit the camera model for a folder
Post by: Phil Harvey on March 15, 2013, 07:57:34 AM
exiftool -model="some model name" -ext nef FOLDER_NAME

- Phil
Title: Re: Batch edit the camera model for a folder
Post by: happygun on March 15, 2013, 08:45:38 AM
Many thanks Phil. Can now open d7100 nef files in lightroom!
Title: Re: Batch edit the camera model for a folder
Post by: happygun on March 15, 2013, 04:28:34 PM
One more question Phil.

Once i have edited the camera model, Lightroom can then import these files. AT some point in the future when lightroom can read d7100 files, can i point exiftool to a directory (including subfolders) and change metadata for all files where camera model = 'Nikon D5200', from 'Nikon D5200' to 'Nikon D7100'
Title: Re: Batch edit the camera model for a folder
Post by: Phil Harvey on March 15, 2013, 04:47:46 PM
Yes:   exiftool -if "$model eq 'Nikon D5200'" -model="Nikon D7100" -r DIR

(the quoting above is for Windows, swap the single and double quotes if you are on Mac or Linux)

Or, if you still have the "_original" backups, and want to simply restore all of them:

exiftool -restore_original -r DIR

- Phil
Title: Re: Batch edit the camera model for a folder
Post by: happygun on March 15, 2013, 05:24:40 PM
Hi Phil,

what switch in that command tells exiftool which directory to look in, or do i replace DIR with the directory?
Title: Re: Batch edit the camera model for a folder
Post by: StarGeek on March 15, 2013, 07:17:20 PM
Quote from: happygun on March 15, 2013, 05:24:40 PM
what switch in that command tells exiftool which directory to look in, or do i replace DIR with the directory?

Replace DIR with the directory.  The -r switch tells it to recurse into subdirectories.
Title: Re: Batch edit the camera model for a folder
Post by: happygun on March 15, 2013, 08:11:37 PM
CHeer, i thought that was the case but command line switches occasionally mystify me....