Copy link to clipboard
Copied
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?
1 Correct answer
document.metadataPreference.replace() or document.metadataPreference.append().
Copy link to clipboard
Copied
It looks like document.metadataPreference.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
document.metadataPreference.replace() or document.metadataPreference.append().
Copy link to clipboard
Copied
Just found the same thing independently. Thanks for the confirmation!

