Batch read metadata from one image and write to another

Started by DC, February 13, 2017, 12:42:10 AM

Previous topic - Next topic

DC

Hi there,

I have two directories of images and I'm wondering if there is an easy way to transfer all of the metadata from images in the first directory and write it to the images in the second directory.

Both sets of images can have matching filenames if that's easier (i.e. copy metadata from /dir1/some-image-1.jpg to /dir2/some-image-1.jpg etc).

I actually only need the GPSLatitude/GPSLongitude and DateCreated but I figured it might be an easier terminal command to just move everything over.

I'm on Mac OSX.

Thanks,

Dave

Phil Harvey

Hi Dave,

To copy just the tags you want (plus some others I thought you might need):

exiftool -tagsfromfile SOURCEDIR/%f.%e -gpslatitude -gpslatituderef -gpslongitude -gpslongituderef -createdate -datetimeoriginal -ext jpg DESTDIR

To copy everything:

exiftool -tagsfromfile SOURCEDIR/%f.%e -all:all -ext jpg DESTDIR

- 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 ($).

DC

Cheers, Phil. That worked an absolute treat!

Thanks very much for your help, and thanks for an incredibly useful tool.

Best,

Dave