trouble deleting meta keywords

General Discussion of Scripting for Adobe Bridge

Moderators: Tom, Kukurykus

Patrick

trouble deleting meta keywords

Post by Patrick »

Here is a snippit of what I am working with:

Code: Select all               var tn = app.document.selections.metadata;
               tn.namespace = "http://ns.adobe.com/photoshop/1.0/";
               
               var k = 0;
               var len = tn.Keywords.length;
               while(k < len){
                  tn.Keywords[k] = null;
                  k++;
               };

What I am trying to achive is completely wiping out all the meta data keywords for an image. Setting them to null or blank do not work, though. Anyone have any idea how I would go about removing keywords?

Patrick
Patrick

trouble deleting meta keywords

Post by Patrick »

After doing some reading on the Adobe forums, I found out that there is no easy way to add or remove meta keywords from a file through Bridge scripting. This is especially surprising considering it is a very easy task to accomplish in PhotoShop scripting.

The best solution I could find was to use ExifTool by Phil Harvey. I have my Bridge script execute exiftool via a .bat file to perform any meta keyword tasks. A little akward, but it does work.