rename file name with date values, combined with Lens data

Started by ajaLx, May 02, 2015, 10:41:11 AM

Previous topic - Next topic

ajaLx

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


Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ajaLx

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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).