Skip to main content
Participating Frequently
October 2, 2013
Question

How to write IPTC metadata to files without opening the file?

  • October 2, 2013
  • 2 replies
  • 1818 views

HI,

I'm trying to run a script (preferably in JS) that allows me to write metadata to a file. I can acheive this very easily by opening the file, but I'd need to batch process many large images, so opening them would cause severe slowness. The purpose of adding the metadata to the files is to search upon them in Bridge.

We're using CS5, but have CS6 if it's better to use.

My Script

// set current doc ref

var docRef = app.activeDocument;

// Set caption in active document

docRef.info.caption = "Some Meta-Data";

Do I need to use bridge to write the metadata without opening the file? Or can running the script in PS allow me to do so?

Thanks,

Tom

This topic has been closed for replies.

2 replies

Inspiring
October 2, 2013

If you want a Photoshop only solution you can use the AdobeXMPScript to edit the metadata without opening the files in Photoshop. The JavaScript Tools Guide has the details in the chapter named "Scripting Access to XMP Metadata".

Otherwise you could send a BridgeTalk message from Photoshop to Bridge to edit the metadata. Or just write a Bridge script with Photoshop out of the loop.

Participating Frequently
October 2, 2013

Hi Michael

Thanks for the reply, I'm not fussed whether I perform the script through Photoshop or Bridge; just as long as it;s the most efficient method.

I had a quick look at this, but wasn't quite sure where to start. I usually use the help from the forum combined with the guides to finally get to grips with what I'm trying to do.

Would you reccomend Bridge over Photoshop?

Thanks,

Tom

Chuck Uebele
Community Expert
Community Expert
October 2, 2013

I could be wrong, but I'm pretty sure you have to use bridge to do this, as it can change the metadata without opening the file.  It would be great if this could be done in PS, as I'm much more familiar writing scripts for it than in Bridge.

Participating Frequently
October 2, 2013

Thanks, if I manage to get one working I'll share.