Change filenames to Title Case
I'm struggling to change filename to Title Case for yearbook photos in Bridge.
Is there a script I can use?
I'm struggling to change filename to Title Case for yearbook photos in Bridge.
Is there a script I can use?
I wrote a script for this, I'll post it when I'm in front of a computer.
EDIT: Here you go. Note that special handling of Irish and Scottish and other names is required and is beyond the scope of this script.
https://community.adobe.com/t5/bridge-discussions/script-to-batch-rename-as-title-case/td-p/14319096
/*
Rename to Title Case.jsx
v1.0 - 26th December 2023, Stephen Marsh
https://community.adobe.com/t5/bridge-discussions/script-to-batch-rename-as-title-case/td-p/14319096
*/
#target bridge
if (BridgeTalk.appName == "bridge") {
var titleCase = new MenuElement("command", "Rename to Title Case", "at the end of Tools");
}
titleCase.onSelect = function () {
var theFiles = app.document.selectionsLength;
for (var a = 0; a < theFiles; a++) {
var selsName = decodeURI(app.document.selections[a].spec.name.replace(/\.[^\.]+$/, ''));
var selsExt = decodeURI(app.document.selections[a].spec.name.replace(/(^.+)(\.[^\.]+$)/, '$2'));
app.document.selections[a].name = toTitleCase(selsName) + selsExt;
}
function toTitleCase(theText) {
var theText = theText.toLowerCase().split(' ');
for (var i = 0; i < theText.length; i++) {
theText[i] = theText[i].charAt(0).toUpperCase() + theText[i].slice(1);
}
return theText.join(' ');
}
}
Look for the instructions for Bridge:
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.