Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom batch rename 2

Status
Not open for further replies.

Lessa

Technical User
Jan 25, 2005
125
US
I have a few hundred photos that are listed by ISBN13 numbers. They all start with 978. Is there a way to keep the name the same except remove the 978 at the beginning? I'm open to suggestions outside of Photoshop. Thanks
 
What is Bridge? The batch rename feature in Photoshop doesn't allow me to remove part of a name and keep the rest of it as is.
 
Try file menu/automate/Batch

Under destination/file naming choose 1,2,3 or 4 digit serial number from the drop down menu (with document name in it as default). Then put in your starting serial number. That should get rid of the 936 or whatever.

Using OSX 10.3.9 on a G4
 
I don't think I'm explaining this clearly. I want to delete the first 3 characters of the name, but keep the rest of the name. So, if it says 9789999.tif, I want to rename it 9999.tif.

Is there a script that can do this or a Mac OS way to do it?
 
That would be the same as the "serial number" thing above. Just start the serial number with the first number without the 986 in the folder.

You and also try the script in the applescript folder/Finder scripts/Replace text in item namces. If you do not have the scripts folder on your menu bar, look in the Applescript folder for "show scripts folder on toolbar". It will show on the right of your toolbar. Applescript is in your Applications folder.

Using OSX 10.3.9 on a G4
 
I'm open to suggestions outside of Photoshop. Thanks

if your interested I and know how to use Excel macros, I can post a macro to do this.

If you know Excel and are not familiar with macros I can include instructions

sam
 
If you are using photoshop CS2 this should work.

Save the code as anything you like with a jsx extension.
ie: renamefiles.jsx
then from photoshop go to
File - Scripts - Browse and select the above script.
This will prompt you for the directory where your tiff files are to be re-named.
Good luck. Paul.

Code:
//Renames all files in selected folder - removes first three characters
var inputFolder = Folder.selectDialog("Select a folder of documents to process");
var myFile = "";
        
        var fileList = inputFolder.getFiles("*.tif"); 
        for ( var i = 0; i < fileList.length; i++ ) {
        myFile = fileList[i].name;
        fileList[i].rename(myFile.substr(3));  
        }
 
Thanks DucatiST2

I'm STILL on 7.0 waiting to hit the lottery so I can afford CS2 I didn't realize it offered scripting.
 
Version 7 also supports javascript. Go to Adobe and download the free plug-in. I believe that scripts are not compatable between 7 and CS* though.
Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top