ExifTool Forum

ExifTool => Newbies => Topic started by: DC on February 13, 2017, 12:42:10 AM

Title: Batch read metadata from one image and write to another
Post by: DC on February 13, 2017, 12:42:10 AM
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
Title: Re: Batch read metadata from one image and write to another
Post by: Phil Harvey on February 13, 2017, 07:55:50 AM
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
Title: Re: Batch read metadata from one image and write to another
Post by: DC on February 13, 2017, 10:04:09 AM
Cheers, Phil. That worked an absolute treat!

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

Best,

Dave