Skip to main content
Inspiring
September 2, 2010
Answered

Bridge CS5 Renames Files in HTML Web Gallery

  • September 2, 2010
  • 4 replies
  • 4826 views

When creating an HTML Web Gallery (using ‘Lightroom’ template), Bridge CS5 renames the thumbs and large images to an arbitrary number.  The caption reads as the original file name, but the actual image has a new name.  This is problematic, as my clients will right-click selected images from my galleries to save and forward for approval, but the file name is not the same as the original.

As an example: VLNK0321.jpg is renamed as _4856316150.jpg.  (In Preferences/Output, the "Convert multi-byte file names to Full ASCII" is unchecked.)

Is there any way to fix this little (for me--BIG) problem?

This topic has been closed for replies.
Correct answer MarkDas

Solved!


This works for Windows.  I imagine the Mac solution is similar. Props to William Zauscher for helping find an answer.


I take no responsibliity for any damage caused to your computer, Photoshop or Bridge...


In Windows, browse to C:\Program Files\Common Files\Adobe\Bridge CS5 Extensions\Adobe  Output Module\mediagallery\resources\scripts


In the file named "galleryCreator.jsxinc" replace the lines:


AOM.AmgGalleryCreator.createUniqueFileName = function(filePath, jpgFile,  createMode)
{
    var alteredName;
    while (true)
    {
         alteredName = "_";
        for (var i=0; i<10; i++)
        {
             alteredName += Math.floor(Math.random() * 10);
        }
         alteredName += ".jpg";
        var f = new File(filePath +  alteredName);
        if (!f.exists)
            break;
    }
     return alteredName;
}


...with the following:


AOM.AmgGalleryCreator.createUniqueFileName = function(filePath, jpgFile, createMode)

{

                var alteredName;

                while (true)

                {

                                alteredName = "_";

                                alteredName += jpgFile += ".jpg";

                                var f = new File(filePath + alteredName);

                                if (!f.exists)

                                                break;

                }

                return alteredName;

}

You can cut and paste the above.  Just save a version of the original file somewhere in case of screwups...

Cheers!

-Mark

4 replies

jackthegiantkiller
Inspiring
November 23, 2011

Seriously Adobe, get the damn lead out. I'm thankful for these hacks, but you still haven't managed to correct this problem after how many updates/versions?

Known Participant
June 2, 2012

I've found where this script lives on a Mac:

/Library/Application Support/Adobe/Bridge CS5.1 Extensions/Adobe Output Module/mediagallery/resources/scripts

jackthegiantkiller
Inspiring
June 2, 2012

Does anyone know if this has finally been remedied in CS6?

Participant
August 8, 2011

PLEASE HELP -- Huge problems caused by this change.  Because the filename doesn't travel with the new image as it used to, this throws the whole order of huge galleries I'm doing for work.

This software is too costly to not have that functionality go along with the CS upgrade.  Please fix with an update ASAP or if I'm missing something for Mac, let me know.

Thanks and best..

MarkDasAuthor
Inspiring
April 8, 2011

I believe I've discovered the file/script that does the renaming.  I've done some testing, and have been able to change the way Bridge does the changes, but not able to keep the original file name.

The file is "galleryCreator.jsxinc", found in C:\Program Files\Common Files\Adobe\Bridge CS5 Extensions\Adobe Output Module\mediagallery\resources\scripts.

I'm not a code-guy, so I'm hoping that someone with more smarts than I can help.  Below is the part of "galleryCreator.jsxinc" that does the re-naming.  Simply deleting this entire part of the script renders Bridge unusable.  So allowing the script to create the altername is important.  If the alteration could consist of only adding the "underscore" prefix to the original file name, all would be well...

Here's the pertient portion of the script:

AOM.AmgGalleryCreator.createUniqueFileName = function(filePath, jpgFile, createMode)
{
    var alteredName;
    while (true)
    {
        alteredName = "_";
        for (var i=0; i<10; i++)
        {
            alteredName += Math.floor(Math.random() * 10);
        }
        alteredName += ".jpg";
        var f = new File(filePath + alteredName);
        if (!f.exists)
            break;
    }
    return alteredName;
}


MarkDasAuthorCorrect answer
Inspiring
April 26, 2011

Solved!


This works for Windows.  I imagine the Mac solution is similar. Props to William Zauscher for helping find an answer.


I take no responsibliity for any damage caused to your computer, Photoshop or Bridge...


In Windows, browse to C:\Program Files\Common Files\Adobe\Bridge CS5 Extensions\Adobe  Output Module\mediagallery\resources\scripts


In the file named "galleryCreator.jsxinc" replace the lines:


AOM.AmgGalleryCreator.createUniqueFileName = function(filePath, jpgFile,  createMode)
{
    var alteredName;
    while (true)
    {
         alteredName = "_";
        for (var i=0; i<10; i++)
        {
             alteredName += Math.floor(Math.random() * 10);
        }
         alteredName += ".jpg";
        var f = new File(filePath +  alteredName);
        if (!f.exists)
            break;
    }
     return alteredName;
}


...with the following:


AOM.AmgGalleryCreator.createUniqueFileName = function(filePath, jpgFile, createMode)

{

                var alteredName;

                while (true)

                {

                                alteredName = "_";

                                alteredName += jpgFile += ".jpg";

                                var f = new File(filePath + alteredName);

                                if (!f.exists)

                                                break;

                }

                return alteredName;

}

You can cut and paste the above.  Just save a version of the original file somewhere in case of screwups...

Cheers!

-Mark

May 15, 2011

Thanks for posting.  I do not see that folder in my computer.  Any advice on how to get there and replace the renaming script.  Under Adobe in Common Files I only see CS5 but not Adobe Bridge.


Adobe, the file renaming feature is inexcusable.  This creates untold number of headaches.  What if a client wants a photo, or 10>  Trying to match them is a PIA.  Worst of all, when making web galleries, Bridge strips all metadata out of images and in the past I could replace the "large" folder with all images with originals with metadata but now they all have different file names and I'd have to match and rename each photo to get that to work which could be tedious for a gallery with 100 photos.

Why does Bridge strip all metadata out of photos when creating a photo gallery?  I could add it after but it does use that data to create visible text in web galleries but also removes it from images.

Think I am going back to CS4 cause this is too much trouble.

Adobe, add the web gallery feature back to Photoshop and with Bridge, keep the metadata in the photos and get rid of the file renaming feature.  Nobody asked for this.

jackthegiantkiller
Inspiring
March 11, 2011

This affects me greatly as well for the same reasons. There is no reason for this, Adobe.