Copy link to clipboard
Copied
I'm trying to make contact sheets with around 200 photos - everything is working great except it insists on including the .JPG in all the photo labels. I went through and deleted it off all the photo names (so Few_House.JPG became just Few_House) but it still prints them on the contact sheet. Any ideas on how to remove that, other than going through and marking up each individual label?
Copy link to clipboard
Copied
edit the contact sheet II Photoshop script and change the way it creates the labels. Strip the file extensions. Change how var caption is set
Copy link to clipboard
Copied
Thank you for the reply JJMack.
What should the script be changed to to remove the file extensions?
Copy link to clipboard
Copied
I too appreciate this information as I regularly use contact sheets but would like to remove the file name extension from the captions. However, I've never changed a script before; could someone walk me through that process so I don't mess things up?
Copy link to clipboard
Copied
You don't need to edit the script. Forget all that. When you are in the contact options just make sure that the box for "flatten all layers" isn't checked off, create your sheet and use the find and replace text box to remove the file extensions. Way easier.
Copy link to clipboard
Copied
Thank you, thank you, thank you. You made my day. For years I have searched for ways to do this.
Your procedure is so simple.
Copy link to clipboard
Copied
Quit Photoshop.
Backup the ContactSheetII.jsx file found in your Photoshop application Presets/Scripts directory.
Edit the ContactSheetII.jsx file in a plain text editor (if using Apple TextEdit, ensure that it is plain text mode and not rich text).
Edit line 6587 which should read as:
self.noExtensions = false;
Change the boolean value:
self.noExtensions = true;
Restart Photoshop and enjoy!
A full-featured advanced Contact Sheet X can be found here:
https://sourceforge.net/projects/ps-scripts/files/ContactSheetX/v2.2/CSX-2_2.zip/download
Copy link to clipboard
Copied
An alternative to editing the ContactSheetII.jsx file is to run a script to remove filename extensions from all text layers. This is good for a mix of different file extensions, otherwise the standard find/replace is good.
#target photoshop
// Remove filename extension from all text layers
for (var i = 0; i < app.documents.length; i++) {
app.activeDocument = app.documents[i];
var doc = app.activeDocument;
for (var j = 0; j < doc.layers.length; j++) {
try {
doc.activeLayer = doc.layers[j];
if (app.activeDocument.activeLayer.kind == LayerKind.TEXT) {
doc.activeLayer.textItem.contents = doc.activeLayer.textItem.contents.replace(/\.[^\.]+$/, '');
}
} catch (e) {}
}
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html