Skip to main content
New Participant
June 30, 2014
Question

Adobe Bridge CC: Batch Rename using any metadata field

  • June 30, 2014
  • 4 replies
  • 6772 views

How can I add certain Metadata fields to the pull down menu in the batch rename function?

I need to do a batch rename of files, but using metadata fields that are not available as an option on the pull down menu.

Hoping to use any or all of these:

Audio : Artist, Album, Genre

IPTC Core : Description, Keywords, etc..

This topic has been closed for replies.

4 replies

New Participant
March 31, 2021

Hi I can't see this thread? 

I need to add "Description" as one of the dropdown choices when batch re-naming using the Metadata option.

There seems to be lots of camera metadata as an option, but I would like to pull this from the IPTC core, and rename all photos, each having it's own unique description in the filename.  Is this possible without an additional plug in? thank you!

Stephen Marsh
Adobe Expert
April 1, 2021

The following code adds the description to the end of the base name (ensure that the base name has a separator character at the end such as an underscore _ or the script could be modified to do this if required).

 

/* https://community.adobe.com/t5/bridge/adobe-bridge-cc-batch-rename-using-any-metadata-field/td-p/6215682

https://www.ps-scripts.com/viewtopic.php?f=72&t=14282&p=89792&hilit=rename#p89787

Original script modified by Stephen Marsh 2021 */

#target bridge
if (BridgeTalk.appName == "bridge") {
    RenDesc = new MenuElement("command", "Add Description to End of Filename", "at the end of tools");
}

RenDesc.onSelect = function () {
    var sels = app.document.selections;
    for (var z = 0; z < sels.length; z++) {
        var thumb = sels[z];
        var selectedFile = thumb.spec;
        var baseName = selectedFile.name.replace(/[:\/\\*\?\"\<\>\|]/g, "_").replace(/(^.+)(\.[^\.]+$)/g, "$1");
        var ext = selectedFile.name.replace(/[:\/\\*\?\"\<\>\|]/g, "_").replace(/(^.+)(\.[^\.]+$)/g, "$2");
        md = new Thumbnail(selectedFile).synchronousMetadata;
        md.namespace = "http://purl.org/dc/elements/1.1/";
        Desc = md.description;
        Desc = Desc.toString().replace(/[:\/\\*\?\"\<\>\|]/g, "_");
        File(selectedFile).rename((baseName + Desc + ext));
    }
}

 

Instructions for saving and installing here:

 

Downloading and Installing Adobe Scripts

 

Participating Frequently
March 25, 2022

@Mark K Phillips 

 

That's a standard EXIF field.

 

The following script will add an underscore after the filename with the exif:UserComment field added at the end before the extension.

 

Example:

 

my-file.jpg

my-file_usercomment.jpg

 

/* https://community.adobe.com/t5/bridge/adobe-bridge-cc-batch-rename-using-any-metadata-field/td-p/6215682

https://www.ps-scripts.com/viewtopic.php?f=72&t=14282&p=89792&hilit=rename#p89787

Original script modified by Stephen Marsh 2022 */

#target bridge
if (BridgeTalk.appName == "bridge") {
    RenusrCom = new MenuElement("command", "Add EXIF User Comment to End of Filename", "at the end of tools");
}

RenusrCom.onSelect = function () {
    var sels = app.document.selections;
    for (var z = 0; z < sels.length; z++) {
        var thumb = sels[z];
        var selectedFile = thumb.spec;
        var baseName = selectedFile.name.replace(/[:\/\\*\?\"\<\>\|]/g, "_").replace(/(^.+)(\.[^\.]+$)/g, "$1");
        var ext = selectedFile.name.replace(/[:\/\\*\?\"\<\>\|]/g, "_").replace(/(^.+)(\.[^\.]+$)/g, "$2");
        md = new Thumbnail(selectedFile).synchronousMetadata;
        md.namespace = "http://ns.adobe.com/exif/1.0/";
        usrCom = md.UserComment;
        usrCom = usrCom.toString().replace(/[:\/\\*\?\"\<\>\|]/g, "_");
        File(selectedFile).rename((baseName + '_' + usrCom + ext));
    }
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html


Thanks Stephen

That works nicely, appreciate your help

TheHoaryHound
Known Participant
June 6, 2016

This is easily done with Photo Mechanic... and probably one of the key reasons I'm using that software.

Sure would love to be able to batch rename using ANY of the IPTC fields, not just the fields provided in the dropdown menus.

I'd also like to insert Items such as "star rating" and "color rating" into the file name as well.

Has anyone found an answer to this? Seems like it should be possible.

Thanks.

Stephen Marsh
Adobe Expert
June 7, 2016

Add your support to my request or make your own request:

Bridge Batch Rename Using Any XMP Data | Photoshop Family Customer Community

From a scripting perspective, I am sure that it is possible, however I am guessing that it is not an easy task (what to do if an image has blank metadata in the source field, how to handle metadata characters that are not legal for the operating system file name etc).

My solution is to use ExifTool

Stephen Marsh
Adobe Expert
February 8, 2016

I just placed a feature request.

It would be nice if there was a Bridge script to do so though!

Bridge Batch Rename Using Any XMP Data | Photoshop Family Customer Community

Inspiring
July 11, 2014

I don't think there is any way in which you can add to the built-in functions…

Unless this is actually provided by one of the Adobe start-up scripts… ( I've not see it when digging about )

You would probably need a scripted solution that can give you drop down menu of the extra options you want.

New Participant
August 23, 2015

Hello,

I have the same request.

I am trying to use IPTC Core & Extension Data to batch rename many files on a regular basis.

It seems that most of the metadata available for batch renaming in bridge is read only. I need to enter a custom and very specific naming convention. I would be willing to use different files if necessary.

I also was wondering if its possible to create custom metadata and then use those fields to run a batch rename?

Any help is greatly appreciated.

Anthony