My filename system:
20221116-213900-name-camera-0001.jpg
yyyymmdd-hhmmss...
I export either jpg's, png's or for video mp4 and mov.
Background:
I'm annoyed by Google Photos – it always sets the date to the time I exported the photos / videos, and not the damn real date!
From Germany,
– Marie
Hi Marie,
Use this command to set DateTimeOriginal from your file name for all files in directory DIR:
exiftool "-datetimeoriginal<filename" DIR
But I'm not sure you really want to set DateTimeOriginal. Use this ExifTool command to see what date/times you really want to change:
exiftool -a -G1 -s -time:all FILE
I'm guessing you probably want to set FileModifyDate and/or FileCreateDate or something like that, which are the filesystem date/times.
- Phil
Hi Phil!
Thanks for the answer – I'll try it out, with some backuped footage, right now.
But: my filename contains more than just the date, in fact, it looks like this:
yyyymmdd-hhmmss-NAME-CAMERA-0001.jpg/mp4/mov
I'll try! :)
Getting back soon
The command should work fine as long as the date comes before any other numbers.
- Phil
Hi Phil,
since I'm an complete beginner, what am I doing wrong? ->
I'm on Mac, so I'm opening the terminal. And I'm entering this:
exiftool "-datetimeoriginal<filename" /Volumes/MG 2,5" G1 5TB/2021-05-15-Adv-02-Roadtrip/exiftool
and then, nothing happens inside of the terminal – maybe thats right?!
On Google Photos it's still not working, so maybe I need to add the other Date's as well – or I've done the terminal thing wrong.
(I also tried to type "exiftool" before entering this command, but then, if I try to paste it below the absurd long information wall, I hear a few sounds and nothing happens)
Hehe :) xD
The quotation mark in your volume name is a problem. Try this:
exiftool "-datetimeoriginal<filename" '/Volumes/MG 2,5" G1 5TB/2021-05-15-Adv-02-Roadtrip/exiftool'
...but again, I don't think you want to be setting DateTimeOriginal, especially for video files.
- Phil
Hey Phil,
you have been right. It worked.
I'm actually a tiny bit frustrated, that new files are being created? Is there an option for overwriting the existing files - orrr, even better bc thats the main problem, just change the metadata in the file itself, instead of writing (my usecase video files) hundreds of GB each time on my disk.
Thanks Phil, you're rocking this exif tool hm? 19K posts? damn
_ Sincerely
You can add -overwrite_original to the file to avoid saving the backups, but ExifTool rewrites the entire file each time, there is no way around this.
- Phil
Yeah, 19K posts, but that is in 12 years, which is only an average of 4 posts per day.