ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ajaLx on May 02, 2015, 10:41:11 AM

Title: rename file name with date values, combined with Lens data
Post by: ajaLx on May 02, 2015, 10:41:11 AM
Hi,

I can't find to combine these 2 in 1 solution?
So date value in filename as well as Lens data (used for AF adjustment)

Now i have 2 separate cmd files:   (Thanks to examples on this forum !!)

set DngPath="D:\Fotografie\Pentax RAW\20150502"
rem rename filename based on date created
exiftool -d "%%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%e" "-FileName<CreateDate" %DngPath%
rem rename filename based on Lens data
exiftool "-filename<$UniqueCameraModel $LensType - focallength $focallength - AFAdjustment $makernotes:AFAdjustment%%-c.%%e" %DngPath%

Thanks in advance,
Aloys Jansen

Title: Re: rename file name with date values, combined with Lens data
Post by: Phil Harvey on May 02, 2015, 06:48:22 PM
Hi Aloys,

exiftool -d "%%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%e" "-FileName<$CreateDate $UniqueCameraModel $LensType - focallength $focallength - AFAdjustment $makernotes:AFAdjustment%%-c.%%e" %DngPath%

This should work as long as all of these tags exist in the file.

(I assume you are running this in a .BAT file.)

- Phil
Title: Re: rename file name with date values, combined with Lens data
Post by: ajaLx on May 03, 2015, 05:07:12 AM
Hi Phil,

I did not know, how to combine these two.
So, thank you very much, this works perfectly!

Finally a little changed (original file extension and copy number, only once):
exiftool -d "%%Y%%m%%d_%%H%%M%%S%%%%-c" "-FileName<$CreateDate $UniqueCameraModel $LensType Fl=$focallength AfAdjust=$makernotes:AFAdjustment.%%e" %DngPath%

Again, thank you very much for this nice tool, and your help.
Aloys
Title: Re: rename file name with date values, combined with Lens data
Post by: Phil Harvey on May 03, 2015, 06:57:51 AM
Hi Alloys,

Quote from: ajaLx on May 03, 2015, 05:07:12 AM
Finally a little changed (original file extension and copy number, only once):

Ah, right.  I didn't notice those in the -d argument.

- Phil