Batch Rename within folders?

General Discussion of Scripting for Adobe Bridge

Moderators: Tom, Kukurykus

epic

Batch Rename within folders?

Post by epic »

Does anyone have a script or ideas to add in this feature to the current CS5 "Batch Rename". I'd like to select a folder or group of folders and rename the files within, keeping the folder structure. Currently you have to select the images to run this batch rename. It would be great if you could select a folder.

Another thing, anybody have scripts to rename a folder and or files from uppercase to lower case and vs versa?
Ideas?
larsen67

Batch Rename within folders?

Post by larsen67 »

For your second point JavaScript has a change case. So depending on how you want this to work you could change the names of the thumbnails… Do you want to do them all or just the selected ones? This is a basic example that should work with selected items…
Code: Select all#target bridge

var a = app.document.selections;
var b = app.document.selections.length;
if (b > 0) {
   for (var c = 0; c < b; c++) {
      a[c].name = a[c].name.toUpperCase();
   }   
}

Change toUpperCase() to toLowerCase() to for your other option…