ExifTool Forum

General => Metadata => Topic started by: Cheeezcake on February 15, 2019, 02:53:58 AM

Title: Date from name to meta
Post by: Cheeezcake on February 15, 2019, 02:53:58 AM
Hi! Writing here for the first time. Moreover, my English isn't really good, so sorry.

Situation:
I'm using Yandex.disk as cloud sevice to store my gallery because it provides unlimited space for media uploaded with auto-upload feature. While uploading media the service renaming it using meta data like capture date or file creation date if the first parameter doesn't exist.

Names looks like:
2019-02-11 14-56-21.JPG
or sometimes:
2019-02-11 14-56-21_1549888734424.JPG

So, after downloading full gallery from the cloud I have correct date in names of files, but incorrect creation date and about 5500 files without capture time tag. It's impossible to restore order in stock windows photo application and just exiftool "-filemodifydate<datetimeoriginal" can't help me.

Question:
Is it possible to fill meta data parsing date and time from the name of file? Help me, please!

Sorry for any mistakes or if I've chosen wrong section of forum to create this topic.

Thanks to Phil Harvey for this great program!
Title: Re: Date from name to meta
Post by: StarGeek on February 15, 2019, 03:30:43 AM
Unfortunately I'm on mobile at the moment so I can't provide links but look at FAQ number 5 from the main site. Specifically the third paragraph in the example that follows.

Edit: Now that I'm on my desktop, I can expand.

See the 3rd paragraph of FAQ #5 (https://exiftool.org/faq.html#Q5).  Because the first 14 numbers of the filename are the date and time of the image, you can just directly copy the filename into any date/time tag.  So, for example, if you want to copy to the FileModifyDate, you can just use "-FileModifyDate<Filename"
Title: Re: Date from name to meta
Post by: Cheeezcake on February 21, 2019, 06:43:59 AM
Thank you a lot!
It worked great for me.

But I have these warnings for some files:
Warning: Non-standard header for APP1 XMP segment - D:/1/2015-11-02 17-09-22.JPG
Warning: [minor] The ExtractEmbedded option may find more tags in the movie data - D:/1/2016-05-09 09-08-12.MOV


But I can't finde any repercussion of it.
Title: Re: Date from name to meta
Post by: Phil Harvey on February 21, 2019, 07:03:50 AM
The XMP warning indicates a bug in whatever software wrote the XMP.  This may affect other software, but ExifTool is able to deal with this.  The ExtractEmbedded option is informational only -- ExifTool won't parse the movie data for streamed metadata unless you tell it because this may slow processing considerably.

- Phil
Title: Re: Date from name to meta
Post by: Cheeezcake on March 01, 2019, 11:49:44 AM
Thanks a lot guys!