Use filename to change creation date on mov files

Started by KarmaCamelia, September 16, 2021, 05:15:33 PM

Previous topic - Next topic

KarmaCamelia

Hi All,
I've dug around the forums to get to the point that I know that the exiftool is the answer to my prayers and I have even manged install and to run the tool and get the creation date changed to todays date but I don't use terminal normally and can't tweak things to use the filename correctly...

Basically all my creation dates are the date I copied them on to my mac so I need to update them to the date they were really created which is shown in the filename. The file name like this:
clip-2015-01-17 19;20;06.mov

I tried exiftool '-CreateDate<FileName' '-ModifyDate<FileName' -r -overwrite_original -ext MOV  DIR
and also exiftool  '-ModifyDate<${Filename;s/^clip-\d+//}' '-ModifyDate<${CreateDate;s/^clip-\d+//}' DIR

hoping that it would recognise the date in the filename by itself but I guess it hasn't as it gave me the time that I ran the command as the creation date.  Please could you help?  I have 3000 files to change and I'm clueless! Thank you

StarGeek

This is basically FAQ #3.  You're setting the embedded CreateDate/ModifyDate, but it sounds like what you really want to set is the file system timestamps, FileCreateDate/FileModifyDate.

Run this command to see all the time related tags in the file
exiftool -time:all -G1 -a -s file.mov
Compare the output from that to whatever you are using to see your creation date.  If you have a match, copy to that tag from the filename.  I'm guessing the command you really want is
exiftool '-FileCreateDate<FileName' '-FileModifyDate<FileName' file.mov

Also, one thing to take note of is that the Quicktime:CreateDate/Quicktime:ModifyDate tags are supposed to be set to UTC.  If they were filmed in the same timezone as the computer, you can add the -api QuickTimeUTC option and exiftool will automatically adjust the time to UTC.  For example, this will set those tags to UTC.
exiftool '-CreateDate<FileName' '-ModifyDate<FileName' -api QuickTimeUTC file.mov

* 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).

KarmaCamelia

Thank you, I feel like i understand it all a bit better now!  I ran that first command and found the tag where the date was correct and then I used FAQ24 to copy it to the system date...using
"-filemodifydate<CreationDate"

and now I have 1000 videos I can add to my other videos and be able to sort them to find duplicates sooo much more easily!
Thank you!!