I am trying to control filename when saving via an action.

Let's start with an image open on screen. It is called "image1.png". I press record to start the action. I run a greyscale filter. I then use save as and save it (in the same directory I got the original image from" as "image1_greyscale.png". Then I close image on screen and stop recording image.

Problem is when I use it on any other image eg "imagetwo.png", it also saves as "image1_greyscale.png". Which is wrong. I would prefer if I could get the action to save as something like;

"originalfilename" + "_greyscale".png

I want to batch process large amounts of files and have their greyscale versions output correctly. All help appreciated!

(I could get something like what i need through the batch tab, but that would mean every time I change between batches i need to correctly set the filename change, I would much rather have it hardcoded directly into the action itself)

  • 1
    Have you tried saving it to a different directory as part of the action? – Lauren-Clear-Monica-Ipsum Oct 13 '14 at 9:38

It's possible to add a suffix to each of the files you save, but (as far as I know) only via the Batch Processing feature. First, you need to create the Action without the Save command. Then, from the File menu, choose Automate > Batch..., and a dialogue will appear:

Batch Processing dialogue - original

You need to choose a folder with the files you want to process (alternatively, you can use the files you have opened in Photoshop) and a save directory (can be the same or a different folder). Then you add the suffix by altering the File Naming section, like this:

Batch Processing dialogue - alterations

As you can see, I added the "_greyscale" part in between the Document Name and the extension. The example file name has changed to reflect it.

When you're satisfied with your changes, click "OK", sit back and watch the magic happen.

Hope this helps!

ETA: Sorry, I didn't notice the last part about you already trying Batch. I don't think you need to hardcode the name change each time, the program remembers your last choice - unless you process hundreds of different images with multiple Actions, then you would have to add and/or remove the suffix each time you do it.

My answer still stands, I don't think there's a way to hardcode it into the Action itself (but I will gladly see someone prove me wrong).

  • This is a very good explanation. It worked fine for me even on CC as of today. Thanks. – Nirav Zaveri Sep 25 '15 at 12:17

When writing the action use "Save As" - do not simply use Save. If you use Save then it will always use the same file name used when the action was created.

Pretty sure that should hard wire it into your action. My actions all save with the Original file name and I am reasonably certain that is how it is accomplished.

Do not try to add the +greyscale as part of the Action. After the action is completed and you have your greyscale files you could then go in and apply the +greyscale to the file through a Batch Rename.

One last thing - be sure to save your greyscale files created in the action to a different folder than the one with all originals or you may overwrite the originals. Good luck.

  • Sounds like OP is already using Save as in the action so I'm not sure what this answer helps with exactly. – Hanna Aug 31 '15 at 21:55

If you have an existing image with a filename, use "Save for Web" (Legacy in CC 2015) as your export method and the original filename is preserved. You can also control the directory the file goes to using this method.

Not the answer you're looking for? Browse other questions tagged or ask your own question.