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 asand 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)
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:
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:
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).
Source : Link , Question Author : Gary , Answer Author : Jadeitea