Skip to main content
Known Participant
March 7, 2013
Question

Is there a way to batch-name photoshop files from an Excel (or other) list?

  • March 7, 2013
  • 1 reply
  • 2815 views

  I have a couple hundred photos that need to be resized and named. I've got a PS action that resizes them, but is there a way to also have them pull the name from an Excel (or other type) of list?

I found this vbs script that will pull values from an excel file and paste them into a layer, so it's close... but not close enough for me to know how to reconfig it for my purposes.

http://www.ps-scripts.com/bb/viewtopic.php?f=16&t=5182

I am on a Mac (OS X 10.8) and using Photoshop CS6 and Office 2011, if it matters.

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
March 7, 2013

Not many people use vbs, most here would save to a csv file then read and process it with JavaScript.

HeyKate27Author
Known Participant
March 11, 2013

Well, it doesn't really matter if it's VBS or not. I just used that as an example of something that achieves a goal *close* to what I'm looking for, but not exactly.

Inspiring
March 11, 2013

Yes all my files are in the same folder.

Automator doesn't seem to have a built-in routine for pulling file names from a list.

I have been trying to find an AppleScript or such to do this for me, but I'm not very good with this coding language, and by the time it would take me to write something myself I could probably just have named all the files one-by-one.

So I'm wondering if anything like this already exists and could save me the time and headache of making sure I don't fat-finger incorrect info into the fields myself.


Well this is bare bones but may help… As is it just reads a list from text file… Gets the JPEGs of a given folder and re-names them… Should be an easy edit to adjust to your needs… It does nothing to check anything adds up… What file formats do you have and do the new names already have proper extension…?

renameFiles();

function renameFiles() {

 

          var i, files, fold, names;

 

          names = File.openDialog( ' Where be the file names…?' );

 

          fold = Folder.selectDialog( ' Where be the files…?' );

 

          if ( names != null && fold != null ) {

                    files = fold.getFiles( '*.jpg' );

 

                    names.open( 'r' );

 

                    count = files.length;

                    for ( i = 0; i < count; i++ ) {

 

                              files.rename( names.readln() + '.jpg' );

 

                    };

 

                    names.close();

 

          };

 

};