ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Wayo3 on August 27, 2011, 02:14:38 PM

Title: How copy exif tags from one file to another in pairs in bath mode???
Post by: Wayo3 on August 27, 2011, 02:14:38 PM
Hi, I have two sets of files with the same name of file, JPG and  TIFF files, and I want to pass the comments to each other in pairs. What order should I type? the jpg files have the exif tag and I want pass the information to the TIFF file.

Thanks
Title: Re: How copy exif tags from one file to another in pairs in bath mode???
Post by: Phil Harvey on August 27, 2011, 04:08:05 PM
The command could look like this:

exiftool -tagsfromfile %d%f.jpg "-comment>imagedescription" -ext tif -ext tiff DIR

Where DIR is the name of the directory containing the images.

You will have to determine where the comment is stored in the JPG and where you want it in the TIFF, but here I assumed it is stored in the JPEG comment and written to the TIFF ImageDescription.  Also, I don't know if your files are .TIFF or .TIF, so put 2 -ext options in the command.

- Phil
Title: Re: How copy exif tags from one file to another in pairs in bath mode???
Post by: Wayo3 on August 30, 2011, 06:53:11 AM
Hi Phil

the command line you suggested me works perfectly. I copied the tag xpcomment of 40000 jpg to xpcomment, comment and imagedescrption of their respective tif files in a single order.
This is wonderful,

thank you very very much

One more thing, if I do not want to create the file  tif_original or jpg_original, that command should be used in the same line. I've tried-delete_original [!] at the end of the line but does not work.

thanks again
Title: Re: How copy exif tags from one file to another in pairs in bath mode???
Post by: Phil Harvey on August 30, 2011, 07:09:25 AM
Great.  The option you want is -overwrite_original.

The -delete_original feature is used once you have already run the command and want to delete the _original files later.  It is useful in cases where the _original files are scattered through an entire directory hierarchy.

The -overwrite_original option prevents creation of the _original backups in the first place.

- Phil