Adding date to orginal filename

Started by Bruxced, August 12, 2023, 05:30:00 AM

Previous topic - Next topic

Bruxced

Hi,

I am trying to do append the createdate to the original filename. I run the following command:
exiftool '-FileName<$CreateDate $FileName' -d %Y-%m-%d_%H.%M.%S%%-c.%%le -r DIR where DIR is the name of the directorate where the pictures are.

However with a "test.DNG" file, I get something like "AAAA-MM-DD_HH.MM.SS.dng test.dng". Note the double extension..

I would like to get "AAAA-MM-DD_HH.MM.SS_test.dng".
Could somebody help me correct the command?

Bruxced

Ok, I have found the mistake. I had two references to the extension %e and %le.

Correct command:
exiftool '-FileName<$CreateDate - %f.%le' -d %Y-%m-%d_%H.%M.%S%%-c -r DIR