Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Any way to overwrite Date Modified with Date Taken metadata with a PS script?

Engaged ,
Dec 13, 2019 Dec 13, 2019

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.

TOPICS
Actions and scripting
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Dec 14, 2019 Dec 14, 2019

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:

 

https://exiftool.org/forum/

 

Good luck!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2019 Dec 19, 2019
LATEST

It could also be done in Bridge pretty easily. You can watch a folder and auto-process files as they come in.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines