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

UXP/Scripting Solution for Importing and Exporting XMP Metadata

New Here ,
Dec 11, 2024 Dec 11, 2024

I know that there is a manual solution to do this via the File => File Info menu. See images below.

The export option saves an XMP file containing all of the file metadata. 

On a new file, you can import the saved file and select different options about how to treat existing data and what is contained in the file. 

I would like to create a script that performs these actions in a controlled and repeatable way for users.

I am having trouble identifying the relevant UXP objects that would allow me to do this. Has anyone had success with this sort of import and export behavior?

Michael38639541dcyl_0-1733944920351.pngexpand image

Michael38639541dcyl_1-1733949802044.pngexpand image

 

 

TOPICS
Import and export , UXP Scripting
396
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

correct answers 1 Correct answer

Engaged , Dec 11, 2024 Dec 11, 2024

document.metadataPreference.replace() or document.metadataPreference.append().

Translate
Engaged ,
Dec 11, 2024 Dec 11, 2024

It looks like document.metadataPreference.

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
New Here ,
Dec 11, 2024 Dec 11, 2024

Thanks!

I was looking at this object independently and saw a save option, but wasn't sure whether this was the same action as exporting via the GUI. 

I was able to use the document.metadataPreference.save option to save to an XMP file. I do not see a method on this object for importing, though. 

Curious if other folks have found a way to do this.

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
Engaged ,
Dec 11, 2024 Dec 11, 2024

document.metadataPreference.replace() or document.metadataPreference.append().

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
New Here ,
Dec 11, 2024 Dec 11, 2024
LATEST

Just found the same thing independently. Thanks for the confirmation!

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