Copy link to clipboard
Copied
Mac OS X, Photoshop CC latest version.
I have a folder of 44 psd images and would like to automate adding a number to each photo in the picture area (not change the filename).
My attempts using variables isn't working - Photoshop will only add a number to the image open in Photoshop and not the other 43 images in the same folder. All images and text document are in the same folder.
I have tried using a plain text document with only the number required to be added to each image. Also a text file with the filename of each image, tab or comma, and number required to be added to each photo - reversed order als, number, tab or comma followed by filename.
I have tried opening all of the photos in Photoshop, instead of only having the first image containing a text layer with number 1.
I can change the number on the first image open in Photoshop but nothing happens to the remaining 43 images.
Is there a way to instruct Photoshop to process all 44 images - apply a sequential number into each image please?
This is not about the filenam
Copy link to clipboard
Copied
It could be done with variables and data sets, but I question the efficency for such a small number of images. You might want to search for a script.
Copy link to clipboard
Copied
Hi Ed,
I don't have a clue about scripts. Regardless of there only being 44 images, do you know how to achive this with variables and data sets?
I know the steps, I have set up the variables 'Define' panel correctly. After importing the text file in 'Data Sets' there are 1 - 44 data sets shown in the drop down panel.
When I go to export 'Data Sets as Files' all data sets is selected but everytime I get the following, A file named 01.psd already exists in this location, do you want to replace it (usual options; don't replace, replace or cancel). Only changes are allowed to image 01.psd - open in Photoshop.
I thought if the text file and images were in the same folder, variables would work on all of the images?
Copy link to clipboard
Copied
It's such a long time since I used data sets and variables. Can you choose to save them
into a different folder? I have a tutorial
on data sets somewhere that I did a few years back. Let me see if I can dig it out for you.
Copy link to clipboard
Copied
I believe you have been given incorrect advice about variables
Creating data-driven graphics in Photoshop
Copy link to clipboard
Copied
Use Bridge or LR. Select all the photos you want, and use batch rename, using the file's current name as part of the naming process.
Copy link to clipboard
Copied
Hi Chuck,
Thanks for your reply - I did write in my original post this is not about filename changes, its about adding a number in the picture area
Copy link to clipboard
Copied
If you don't mind the sequence numbers being two digits as in 01, 02, 03, 12, etc, then this Picture Processor.jsx script should work.
The script goes in the photoshop presets scripts folder and shows under File>Scripts in photoshop.
GitHub - Paul-Riggott/PS-Scripts: Photoshop Scripts
Copy link to clipboard
Copied
Jeff,
Thanks, I will take a look.
Copy link to clipboard
Copied
Changing the filename can be a temporary means to an end. It is possible to backup the original filename when sequentially renaming. Then a script is run to add the sequential filename as a text layer on the document. After saving, it is a simple matter to use Bridge to batch rename all of the files to their original names.
Copy link to clipboard
Copied
There's no need to do this as you can batch rename the files when exporting them.
Copy link to clipboard
Copied
I think that you have misunderstood my post.
Copy link to clipboard
Copied
Sorry if this is the case. I wasn't quite sure why he would need to run a batch rename after running the Variables solution as this allows for batch renaming as part of the process 🙂
Copy link to clipboard
Copied
Not a problem, I was suggesting an alternative solution which does not involve variables at all.
1) Bridge batch rename to the desired sequence number, preserving the original filename in XMP metadata.
2) Use a script to add the filename as a text layer. The script could be included into an action with the action refining the position and other attributes of the text layer. Batch run this action over all of the images.
3) Use Bridge batch rename to restore the preserved filename.
The sequential filename is just a temporary means to an end that is used by the script to create text in a text layer.
Copy link to clipboard
Copied
I use Windows you a Mac it may be the differences in culture but I have problem following what you write.
"I have a folder of 44 psd images and would like to automate adding a number to each photo in the picture area (not change the filename)."
Where do you want this number to be if not in the file name. Does each PSD contain a single Image or a layer you want identified with a number, do you want a text layer added? What do you actually want to do.
"My attempts using variables isn't working - Photoshop will only add a number to the image open in Photoshop and not the other 43 images in the same folder. All images and text document are in the same folder."
Photoshop variables are are associated with layers in a template psd file and columns in a CSV file used to populate the Template with your images and text the process creates new files would not update your 44 file in any way. Photoshop variable and open image I do not get what you are writing.
"I have tried using a plain text document with only the number required to be added to each image. Also a text file with the filename of each image, tab or comma, and number required to be added to each photo - reversed order als, number, tab or comma followed by filename. I have tried opening all of the photos in Photoshop, instead of only having the first image containing a text layer with number 1. I can change the number on the first image open in Photoshop but nothing happens to the remaining 43 images. Is there a way to instruct Photoshop to process all 44 images - apply a sequential number into each image please?
This is not about the filenam"
You are clear its not about File name you do not want them change and it is also seems clear you want your 44 psd files updated in some way that involves sequential numbers.
What is not clear is what you do want. It seems you may a text layer added to these PSD files. IMO the only way to automate that process using Photoshop is with a Photoshop Script. Which is way above your pay grade. For if you knew Photoshop scripting you would not have needed to start this thread.
If all the PSD are all the same size and resolution, have the same layer structure the script may be quite simple. If not the programming involved could be quite complex.
IMO you should open each in Photoshop one at a time and add the number you want where you want and if a visible number in the image the size and location you want. Its only 44 files. If this will become a regular ongoing process you need to do. You could think about automating the process. However it will take a very long time to learn to Script Photoshop, weeks, months perhaps years.
Copy link to clipboard
Copied
I am trying to place a number on each image (text layer), in the corner. I start by opening a psd file and add a text layer with the number 1. I record this as an action in case its needed for variables.
I complete a text file with a heading and a list of numbers 1-44. I set up variables > define > data sets using the same folder containing the 1-44 psd files and the text document used by variables.
I use export > data sets as files but it gets stuck on the psd image open in Photoshop.
I dis find this tutorial How to create a batch job, numbering images (writing text on them) from 1 to 100 in Photoshop? - Gra...
In Photoshop CC I can't find the same option 'select file' as the tutorial suggest -
"A Data Set is a collection of values that apply to a particular output document, not a complete set of values in a comma-delimited file, so now we define a starting image for our template by clicking the "Select File..." with the Image variable selected. I chose the Chrysanthemum image. Be sure that "Do Not Replace" is NOT selected."
Copy link to clipboard
Copied
Actually, I do that with Lightroom you will do it very easy and do the job very well
Check the below solutions:
Solution A same as (JJMack): Creating data-driven graphics in Photoshop
Solution B: Using Photoshop Lightroom
Solution C:
Copy link to clipboard
Copied
Ahmed,
Thanks for your help, I like the Lightroom option!
Copy link to clipboard
Copied
You are most welcome Nick
Copy link to clipboard
Copied
Ahmed,
Your concise Lightroom instructions worked a treat first time around, without a headache, thanks once again.
Copy link to clipboard
Copied
Nick
You do not seem to get data driven graphics. You create a Template PSD file. In that psd document you create layers. So you would create an Image layer and a text layer. The document canvas size would le the size you want you psd images to be perhaps a white background layer. Your image layer would be above the background layer and position over the background layer the size and position you want. Your text layer would be the font you want ant the size you want and the position where you the number to be. You would define your image layer a variable name like Image and the text a variable name like number and save a psd like MyTemplate.psd. You would create a CSV file with two columns Image and Number. and rows for each file you want to create. In your case 44 rows . the first entry the full path and file name of an image file like "C:\My Images\Imagefilename.jpg" followed by a , then text the sequence number the image should have. Photoshop Data driven graphics will use your template and your CVS files and create your 44 psd files.
Data driven graphics will not update 44 existing PSD files
Copy link to clipboard
Copied
You are right about data driven graphics, adding a number to an image for id purposes is new territory for me.
Copy link to clipboard
Copied
Hi there,
This definitely works using Variables, I've just done it. It creates unique PSDs of each image with a unique number on it.
You don't need to use Actions at all so leave them out.
If you follow the tutorial that you posted, all you need to do is create a file that is the same size as your images. You can start with the first image, add a number layer and then save this into a subfolder called "Template Image". Variables will use this image as a template to create your new images which will be copies of the original images but with numbers added to them.
In the tutorial I think you may have missed one step which is to click on the "Add New Data Set button". It's the one next to the Trash can in the "Data Sets" section.
After doing this you'll see the Value > Select File section. In here select the first image in your sequence (probably the one that is open).
After that, here is the place where you select the Data file. In the Data Sets panel, click on the Import button to open up this dialog box. Notice also the checkbox at the bottom of the dialog "Replace Existing Data Sets" - make sure to select this.
Hope this helps 🙂
Then click OK to leave the Variables box entirely, then choose "File > Export Data Sets as Files" - This create a new folder for the files.
Click OK and you're done 🙂
BTW, if this answers your question could you please mark it as "correct" so that it can help other people who want to achieve the same results, thanks a million 🙂
Copy link to clipboard
Copied
Angie,
Many thanks for taking the time to produce this comprehensive post.
Copy link to clipboard
Copied
No problem. Let us know how you get along 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now