Set file creation date as the file's 'last modified' date

Started by ashb, December 03, 2020, 06:29:13 AM

Previous topic - Next topic

ashb

Hi. I am just getting started with exiftool and am a little confused.

I recently imported some photos to my computer and upon importing them, the file creation date changed to the date I imported them, whilst the file 'last modified' date remained as the actual date the photos/videos were taken. Is there a way I can batch copy each 'last modified' date and time so it becomes the 'date created' file data?

I hope this makes sense and I appreciate any help you can give me. Many thanks.

Phil Harvey

Maybe something like this:

exiftool "-filecreatedate<filemodifydate" DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


ashb

Quote from: Phil Harvey on December 03, 2020, 07:24:56 AM
Maybe something like this:

exiftool "-filecreatedate<filemodifydate" DIR

- Phil

Thank you. I have a few videos I would like this to work for too, but that doesn't seem to work for them. Any ideas why?

StarGeek

What are you using to view the timestamps?  Different programs read and display different pieces of metadata.

Run this command on a file to see all the time related tags and figure which one is actually being read.  Note some video file timestamps will be off by your timezone because they are in UTC.  You can add -api QuickTimeUTC to adjust the output and make it easier to read.
exiftool -time:all -g1 -a -s /path/to/files/
* 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).