ExifTool Forum

ExifTool => Newbies => Topic started by: matthi on January 08, 2021, 01:43:59 PM

Title: setting date/time tags from a date embedded in the file name
Post by: matthi on January 08, 2021, 01:43:59 PM
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
Title: Re: setting date/time tags from a date embedded in the file name
Post by: StarGeek on January 08, 2021, 02:33:49 PM
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