How To Change The Created And Modified Date Of Copied Or Downloaded Image Files
Invariably when returning home from vacation I have a bunch of images and videos (iPhone and GoPro) that I want to add to my online library. I’m a stickler for correct meta data so seeing the dates / timestamps get clobbered to the current date / timestamp when copying or transferring was a point of frustration. Many of the tools I use to organize and edit these files use the Created date to sort or to build timelines so correcting each file manually was time consuming and laborious.
Enter the wonderful ExifTool by Phil Harvey. ExifTool gave me a simple and fast process to correct all of clobbered dates and timestamps straight from the CLI.
Since I’m using Mac I install the ExifTool via Homebrew:
➜ ~ brew install exiftool
Then, I create a unique directory to contain all the image & video files I want to update and subsequently copy / unzip / download them there. CD into that directory and run the following command:
➜ iCloud Photos exiftool '-FileCreateDate<CreateDate' '-FileModifyDate<ModifyDate' . -api QuickTimeUTC
1 directories scanned
10 image files updated
1 image files unchanged
If you want to run the command on a directory you are not currently inside of just add the path to the files you want to update vs the current directory dot ‘.’ I show in the example.