Customized datetimeoriginal for Exif possible?

If you need help on how to use the program
Post Reply
hausl78
Posts: 2
Joined: 2020-07-06 06:59:51

Customized datetimeoriginal for Exif possible?

Post by hausl78 »

Hello,

is it possible to rename JPGs to %datetimeoriginal% but in an customized format?

%datetimeoriginal% is "2017-08-18 18-29-55.jpg"

but i woud like to have 2017-08-18_18.29.55_Suffix.jpg

Thank you!
Juergen
hausl78
Posts: 2
Joined: 2020-07-06 06:59:51

Re: Customized datetimeoriginal for Exif possible?

Post by hausl78 »

Update: I made it now via a workaround.

1: Use the default format from the exif function
2: Make a replace via RegEx

and those as a batch, works fine.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Customized datetimeoriginal for Exif possible?

Post by antp »

Hi,
Not possible in one action currently, but using regular expressions you can easily change the format in a second pass (after the exif renaming).
e.g. with this expression:

Code: Select all

(.*)(\d{4})-(\d{2})-(\d{2}) (\d{2})-(\d{2})-(\d{2})(.*)
and this new name:

Code: Select all

$1$2-$3-$4_$5.$6.$7.$8
you should achieve what you want
(to be tested first ;) )

edit: you replied while I was replying, so we came at the same conclusion :D The code here can still be useful if other people need it too
Post Reply