Any way to overwrite Date Modified with Date Taken metadata with a PS script?
Copy link to clipboard
Copied
Anyone know if it is possible to get the Date Taken metadata from a file and write that timestamp into the Date Created meta data? Preferrebaly, this would be done without opening the file in Photoshop and also done directly through a PS script.
I have a batch automation script that processes files and saves new modified copies of each image. Some users need the Date Created data to be the date/time the photo was taken in order to match times to barcode scanner data in another software. When a new image copy is saved, the OS creates a new Date Created timestamp. Preferrably, I'd like to have the script just update the Date Created meta data to match the Date Taken meta data after the image is saved without reopening the file. Not sure if this is possible or not.
Explore related tutorials & articles
Copy link to clipboard
Copied
I'm guessing that ExifTool is probably going to be the best answer. There are many metadata date fields, some may depend on the file format.
I just resaved a PSD from 2018 and the following "original" fields were shown:
[IPTC] DateCreated : 2018:01:18
[XMP-xmp] CreateDate : 2018:01:18 11:48:11
[XMP-photoshop] DateCreated : 2018:01:18 11:48:11.923
[ExifIFD] DateTimeOriginal : 2018:01:18 11:48:11
[ExifIFD] CreateDate : 2018:01:18 11:48:11
While an edited file may contain extra date info, such as:
[IFD0] ModifyDate : 2019:12:15 10:20:57
[XMP-xmp] ModifyDate : 2019:12:15 10:20:57+11:00
[XMP-xmp] MetadataDate : 2019:12:15 10:20:57+11:00
So you'll need to decide to only update the specific fields that you require, or update and remove any conflicting fields that you may not be directly concerned with.
There are some date/time related examples here:
https://exiftool.org/exiftool_pod.html#WRITING-EXAMPLES
And you can also search the ExifTool Forum for more:
Good luck!
Copy link to clipboard
Copied
It could also be done in Bridge pretty easily. You can watch a folder and auto-process files as they come in.

