Set dateTimeOriginal

Started by konoplyov, February 09, 2022, 08:20:48 AM

Previous topic - Next topic

konoplyov

Hello. Sorry for the bad English (i'm russian). I have a lot of files:

photo_08910@13-01-2022_23-22-01.jpg, photo_09132@31-01-2022_17-53-49.jpg, photo_09240@07-02-2022_21-42-35.jpg etc. Overall view: photo_#####@DD-MM-YYYY_HH-MM-SS.jpg

How can I setting "dateTimeOriginal"-tag from a date embedded in the file name? Best regards.

StarGeek

You would have to use regex (regular expressions) to reorganize the dates and drop the leading digits
exiftool "-DateTimeOriginal<${Filename;s/.*@(\d\d)-(\d\d)-(\d{4})/$3$2$1/}" /path/to/files/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

konoplyov


StarGeek

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype