PDA

View Full Version : Dynamically Chaning File Name in CS3 Action



Lance Warley
02-19-2008, 10:44 AM
I created an action to convert a jpg to a certain size and format, including a drop shadow and a matte, for my web site.

Is there a way to have this action also rename this file by keeping the current name but adding "web" to the front of the name and then save it as the new name?

In other words, can the action include saving file "abc.jpg" as "web abc.jpg"?

From the Actions Help, it appears not: "When recording the Save As command, do not change the filename. If you enter a new filename, that new name is recorded and used each time you run the action."

Thanks.

Jim Poor
02-19-2008, 10:52 AM
I don't think CS3 can do it, but Better File Rename probably can. It is very flexible and though it is another step in the work flow, would still save time over renaming each file as you go.

Lance Warley
02-19-2008, 11:32 AM
Thanks, Jim.

Judd Patterson
02-20-2008, 02:57 AM
You can do all of this with a custom Photoshop script. I suggest Javascript for the programming language), but the learning time required for this move might be too much for this relatively simple addition to your action.

Lance Warley
02-20-2008, 07:03 AM
Thanks, Judd. The last time I wrote a program, it was with Fortran.

David Kennedy
02-20-2008, 03:02 PM
Just thinking out loud, you'd be better off renaming file "abc" to "abc web" instead of "web abc," because they'll be sorted sequentially if the modification follows the original filename. If "web" is a prefix, it will be sorted with files starting with "w," so if you're thinking some day "I thought I made a "web" version of this file, "abcdef," you don't have to scroll down to the "w's" to find its web cousin.

As for your actual question, the best thing I can think of is to have the Photoshop action set to "Save As..." to a folder. Then, when you run the action in batch mode, you can click "over-ride save-as command," tell it a specific folder, let's call it "web." Once the images are saved to this "web" folder, go into Bridge, highlight all of the files in the web folder, and do a batch rename. Set the naming scheme so the first part is the original file name, followed by text with "_web." Then you can just drag all of these new "web" files to the source folder and you're all set.

Lance Warley
02-20-2008, 04:28 PM
Thanks very much for putting all this time into it, David!!!!!