1 Reply Latest reply: Apr 13, 2011 9:23 AM by MarkDas RSS

    Keep CS5 HTML "lightroom" web gallery template from renaming files...

    MarkDas Community Member

      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?  Can the script be altered to keep the original file name, not the ten-digit arbitrary number that it currently generates? 

       

      Thanks for any help offered!

        • 1. Re: Keep CS5 HTML "lightroom" web gallery template from renaming files...
          MarkDas Community Member

          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;
          }


          I will send a check for $200 to the first person who can rewrite this to simply add the underscore first, then return the original file name instead of the random number generator, and make it work.  Anyone? 

           

          Message was edited by: MarkDas