setting date/time tags from a date embedded in the file name

Started by matthi, January 08, 2021, 01:43:59 PM

Previous topic - Next topic

matthi

Hello,

i try to set date and time from the file name with this code, but it is not working. The file names like this (IMG_20210101_124523.jpg)
/usr/bin/exiftool "-datetimeoriginal<filename" /volume1/import
or
/usr/bin/exiftool "-alldates<filename" /volume1/import

But another code works fine for me.
/usr/bin/exiftool "-filename<CreateDate" -d "/volume1/photo/Import/%Y-%m/%Y-%m-%d %H-%M-%S%%-c.%%le" -r /volume1/photo/out

So i need your help for the first problem, thx

matthi

StarGeek

In what way is it not working?  What is the full output when you run that command? 

What is the output of this command after your run "-datetimeoriginal<filename"
exiftool -time:all -g1 -a -s "-datetimeoriginal<filename" IMG_20210101_124523.jpg
"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