How to set dates from files names with partial data info

Started by maxgiaco01, January 16, 2024, 11:07:31 AM

Previous topic - Next topic

maxgiaco01

Hi ,My name is Max and I'm new in the forum .

I've tried to read through all the topic that helped me to update the creation date starting from the filenames, but I have residual images that I can't update.

I use the following command  :
exiftool "-alldates<filename" -d "%yy%mm%dd%HH%MM" Dir
and it works fine for files named in this way :
IMG-20220729-WA0032 (the output data is 2022/07/29 00:32 even if the time in terms of hh:mm is wrong since 0032 is just a sequential number),
but for a file name like this: IMG-20230717-WA0071 I got back the following exception:"Warning: Minutes '72' out of range 0..59 " it's correct I don't know how to fix it (I've tried different combinations of command but unsuccessfully).
I don't need to set a specific time ( 00:00 it could be right ) but I'm not able to get over this.
thanks a Lot
Max

StarGeek

See this post for how to copy the date form WhatsApp files with a default time of 00:00:00.

Also, the -d (-dateFormat) option can be dropped from this command as it doesn't do anything. It only affects date/time tags and Filename is not one.  The ability to copy a timestamp from the filename is because of exiftool's flexibility in setting timestamps.  See FAQ #5, paragraph starting "Having said this".
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

maxgiaco01

:) It works like a charm

thanks a lot
p.s. I would never have found the solution without your support