Batch edit the camera model for a folder

Started by happygun, March 15, 2013, 05:52:22 AM

Previous topic - Next topic

happygun

Hi all,

not too hot with command line utilities. How do i batch edit the camera model for all nef files in a folder?

Phil Harvey

exiftool -model="some model name" -ext nef FOLDER_NAME

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

happygun

Many thanks Phil. Can now open d7100 nef files in lightroom!

happygun

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'

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

happygun

Hi Phil,

what switch in that command tells exiftool which directory to look in, or do i replace DIR with the directory?

StarGeek

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.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

happygun

CHeer, i thought that was the case but command line switches occasionally mystify me....