I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-05-23 12:31:55-07 by louiscar
Help with copying exif data and wild cards
Sorry if this has been asked before but I've not found it.

I am trying to replace exif data that has been removed usually by Lightroom when exporting a jpg. The situation is that I may create several copies of one file. My naming convention is always to keep the original fname and add to it.

So DSC_3000.nef might have some jpg versions that are DSC_3000_mono.jpg and DSC_3000_v2.jpg

I'd like to find global solution to updating all versions, copying the exif data from the original nef file to all the jpg copies.

I can do this on a spedific file using:
exiftool -tagsFromFile DSC_3937.nef exif.args DSC_3937*.jpg

where exif.args has -exif:all in it. Both jpgs will be updated ok

However, I don't quite know how to do this for all nefs in the folder using something similar to:
exiftool -tagsFromFile %%f.nef -@ exif.args -ext xmp .

because I seemingly can't wild card the target suffix.

Can someone tell me the correct way to do this?
Direct Responses: 10799 | Write a response
Posted on 2009-05-23 13:15:28-07 by exiftool in response to 10798
Re: Help with copying exif data and wild cards
It looks like you want the first 8 characters of the filename, which is done with "%8f". ie)

exiftool -tagsfromfile %d%8f.nef -@ exif.args -ext jpg DIR

If you are using this in a Windows .BAT file (as it seems you might be), then you must double all '%' characters (as in your 2nd example).

I think this should do what you want.

- PHil
Direct Responses: 10800 | Write a response
Posted on 2009-05-23 13:41:31-07 by louiscar in response to 10799
Re: Help with copying exif data and wild cards
Many thanks Phil, That did the trick. regards Louis
Direct Responses: Write a response