Batch Automation Automatic continuous number sequence in the text layer in multiple files

#1
Hello everyone, I have 600 PSD files in which need continuous numbering in defined text layer in the format xxx-xxx from xxx-001 in the first file to xxx-600 in last file. Is there any way to do it automatically? I am using Photoshop CC 2017


I tried create data-driven graphics, but as I am new to this automate operations it was not successful. I just created many versions of the same file.



Thanks in advance for your help

MarfiK
 
Last edited:
#2
Using data sets would be the way I'd suggest.

Your best bet would be to search for tutorials on it as they are probably better than I could explain here.

By all means if you get stuck with a tutorial then post back and we'll see if we can help.

Data sets are pretty easy once you understand how they work.

Regards.
MrToM.
 
#3
I tried to find some tutorials, but they always are about creating sequence numbering in one file ( like numbered tickets or vouchers or so). So if you have idea how to set up it using data sets or some script or plug-in, let me know.


Regards
MarfiK
 
#4
Hmmm, ok, in that case it could possibly be done with a script but I'd need at least two example psd files and detailed specifications on what needs to happen to what and where etc etc.

No guarantee but I'll see if I can make something work.

Regards.
MrToM.
 
#5
Thank you for your willingness MrToM.

Here are attached two sample files fom my 600 file. They all are in one folder in alphabetical order (KE_B04-049 (1), KE_B04-049 (2), KE_B04-049 (3) ........
All files has text layertab. KA/001 (under group Hlavičky) which contains text that need to be edited in this manner: in first file (KE_B04-049 (1)) have to be changed from tab. KA/001 to TAB.1, in second file (KE_B04-049 (2)) from tab. KA/001 to TAB. 2 etc.
There are also files with other prefix (like KO_N11-060) or without serial number in brackets, so number for TAB.x can not be taken from file name.
I hope I wrote it understandable :)

MarfiK
 

Attachments

Last edited by a moderator:
#6
...Thank you for your willingness...
No worries.

Unfortunately that was about all I could read of your post, the rest is illegible.

Please remove all formatting from the contents and post again.

Thank-you.

Regards.
MrToM.
 
#12
Three questions to start off with:

1. is the text layer to edit ALWAYS the uppermost layer in the "Hlavičky" group?
2. Is the text to be edited referenced from the filename?

You mention it later but initially you said it was sequential numbering which doesn't take into account the filename.

Then you've also said this...

...There are also files with other prefix (like KO_N11-060) or without serial number in brackets, so number for TAB.x can not be taken from file name...
...so...

3. Will you be forwarding what you want to do with these files?

FYI, getting the number from the filename is not the way I intended to do this, for the reason above, but if this is what needs to happen then you need to let me know.

Remember... I'm totally dependant on YOU feeding me the information I need to do the job.

Regards.
MrToM.
 
#13
Dear MrToM


1. yes, text layer to edit is always the uppermost layer in "Hlavičky"
2. no, text is not referenced to filename, but if the file is in alphabetical order in for exaple 15th place then text have to be changed from tab. KA/001 to TAB.15
But I can rename files in total commander and then text could be referenced to filename.
3. files will be exported to PDF and printed in book if it is you are askin for (I am not sure what you mean)


I am sorry for delay, I was just working on other copmuter not connected to the internet. But I will be online for about next six hours from now.

Regards

MarfiK
 
Last edited:
#14
Ok, excellent.

So...to keep this simple the new "text" should read...

"TAB."

...and then appended with the position of the file when in Alphabetical order?

Is that right?

Sorry to keep asking but I'd rather just do this once so its better to sort it out now before I start.....nothing worse than having to do something twice....ya know?

Regards.
MrToM.
 
#15
No problem, keep asking :)
Yes, new text will be TAB. and then appended with the position (three-digit number)of the file when in Alphabetical order.
But maybe it would be better to rename files to for example TAB_001 ..... TAB_600.
This eliminates the chance of errors. And it could be easier to script it. What do you thing?
 
#16
I see no reason to re-name the files other than to get them into alphabetical order....which they need to be for the script to work.

The new "text" will then be derived from the file's position in that list.

If what I said before is what you want then thats what I'll do.....if the files in the folder are not in alphabetical order then you'll have to change the filenames....which is MUCH easier for you to do than for me to script it.

My script will [hopefully] simply take all the files in a single folder, and sequentially change the text according to the files alphabetical position in that folder.

Sound right so far?

Regards.
MrToM.
 
#18
No worries.

My only concern at the moment is the language used for the group name but its possible I can work round it....I'll let you know if I need help with that one.

Leave it with me for an hour or so and I'll get back to you.

Regards.
MrToM.
 
#19
OK...try this.

*** BACKUP YOUR PSD FILES BEFORE RUNNING SCRIPT ***

BEFORE RUNNING ON 600 FILES PLEASE CHECK WITH A SMALLER NUMBER FIRST

Usage:
1. unzip and run script. (You can place the .jsx file in 'scripts' folder for easy access later)
2. Select 'Folder' containing the psd files.
3. Let it run.

The script finds all the psd files in the folder, then searches for ANY text layer with contents starting with 'tab' and changes it to TAB.xxx, where xxx is a three digit number relating to the file's position alphabetically.

The file is then SAVED, and closed.

The script then moves on to the next file.....etc etc.

There is minimal error checking so make sure the psd files are in the right order before running the script.

The script:

View attachment numbering_MT_01.zip

Regards.
MrToM.
 
#20
Ooooh! It works like a charm.
Thank you very much, MrToM. If you ever visit Prague, you have a few pints from me.
:beerchug:
I will ask you for one more favor. Can you replace the dot with space, and add three spaces before TAB, so the so that the text is aligned with the axis of photos ( TAB 056). If it is not too complicated.

Best Regards

MarfiK

mince 56.jpg