jpg Exif CreateDate as prefix in filename date format fmt with colons in german

Started by jacky, May 24, 2024, 02:34:39 AM

Previous topic - Next topic

jacky

Hi,

when I print the data of my ram_1.jpg - file I got all the values, see attached log.txt.
The date is printed as (german layout):

Create Date                     : 2017:10:03 11:27:27.069474
Date/Time Original              : 2017:10:03 11:27:27.069474
Modify Date                     : 2017:10:03 11:27:27.069474

I'm searching for hours now in this forum and in Google how to prefix the Exif-date into the filename and it still doesn't work.

E.g. trying
exiftool -d "%Y%m%d-%H%M%%-03.c.%%e" "-filename<CreateDate" .results in
Warning: [minor] Unrecognized MakerNotes - ./ram_1.jpg
    1 directories scanned
    1 image files updated
and creates a file "mHe" (without extension).

Or
exiftool -fileOrder DateTimeOriginal -recurse -extension jpg -extension jpeg -ignoreMinorErrors "-FileName<CreateDate" -d "%Y-%m-%d%%-.3nc.%%e" .results in
Warning: Error rebuilding maker notes (may be corrupt) - ./ram_1.jpg
    1 directories scanned
    1 image files updated
and creates a file "m-e" without extension.

Trying to set the colons in our german date FMT string
exiftool -d "%Y:%m:%d %H:%M%g" "-filename<CreateDate" .reports
Warning: New file name not allowed in Windows (contains ':') - ./ram_1.jpg
    1 directories scanned
    0 image files updated
    1 files weren't updated due to errors

Could you help me how to manage this date prefix into the jpg filename?

I've got so many images and this would help me a lot.  :)

Thanks in advance.

jacky

I just found a solution:
https://exiftool.org/faq.html#Q27
which was mentioned in this post:
https://stackoverflow.com/a/72407154/17058700

Now I'm using the doubled percents in the date expression
exiftool "-FileName<FileModifyDate" "-FileName<CreateDate" -d "%%Y-%%m-%%d_%%%%f.%%%%e" .in a batch file which generates the filename "2017-10-03_ram_1.jpg" which is exactly what I wanted.

So far I'm contented ;)