-
1. Re: Photoshop Batch Bulk Print Action Printing Out of Order
conroy Dec 3, 2012 1:38 PM (in response to perfectblue)Try naming the input files with numbers all padded with leading zeros to the same length. Hopefully, Windows then will pass them to Photoshop in apparent numerical order.
CustomMailer_Data Set 001
CustomMailer_Data Set 002
CustomMailer_Data Set 003
...
-
2. Re: Photoshop Batch Bulk Print Action Printing Out of Order
perfectblue Dec 3, 2012 1:44 PM (in response to conroy)How do I set leading zeros to the same length?
What I tried below does not have the same length. For instance 001 works correctly. But 10 would be 0010. Similarly 100 would be 00100.
I also tried exporting them just as the number, and that didnt work. For example the output was 1,2,3,4,5,6,7,8,9,10,11,12 for the file names and it still printed out of order
-
3. Re: Photoshop Batch Bulk Print Action Printing Out of Order
conroy Dec 3, 2012 2:14 PM (in response to perfectblue)You would need to name files 1 to 9 with '00' padding, files 10 to 99 with '0' padding, files 100 to 900 with no padding.
If you're having difficulty making Photoshop name the exported data set files with zero-padded numbers, then export as you did before and then use a file renaming utility to reformat the numbers in the file names.
-
4. Re: Photoshop Batch Bulk Print Action Printing Out of Order
perfectblue Dec 3, 2012 2:23 PM (in response to conroy)I made a test folder and manually named the files 001,002... 012 etc and it printed them in order with the 3 digits and zero padding. The next issue is doing this for 900 files, obviously I dont want to manually do this. What sort of file renaming utility would you recommend to quickly rename these files with zero padding and in numerical order.
Thanks Conroy im one step closer now to solving this issue.
-
5. Re: Photoshop Batch Bulk Print Action Printing Out of Order
Paul Riggott Dec 3, 2012 2:30 PM (in response to perfectblue)You could run the following code from ExtendScript Toolkit (This gets installed with Photoshop) and it should rename them for you...
var f = Folder.selectDialog( "Please select source folder"); var fileList = f.getFiles("custommail*.*"); for(var a in fileList){ var nums = decodeURI(fileList[a].name).match(/\d+/); fileList[a].rename(decodeURI(fileList[a].name).replace(/\d+/, zeroPad(nums,4))); } function zeroPad(n, s) { n = n.toString(); while (n.length < s) n = '0' + n; return n; }; -
6. Re: Photoshop Batch Bulk Print Action Printing Out of Order
conroy Dec 3, 2012 2:44 PM (in response to perfectblue)perfectblue wrote:
What sort of file renaming utility would you recommend to quickly rename these files with zero padding and in numerical order.
Sorry, I almost never use Windows these days. Looks like Paul has come to your rescue with a script, anyway.
-
7. Re: Photoshop Batch Bulk Print Action Printing Out of Order
perfectblue Dec 3, 2012 3:18 PM (in response to Paul Riggott)@Paul Riggott,
Thanks for taking the time to write the script, I really appreciate it. However, I seem to be using it incorrectly since its not renaming my files.
here is what I did.
1. Launched Adobe ExtendScript & Pasted your code in
2. Saved out script file to desktop
3. Launch Photoshop, file ->script->browse to locate where script was saved to
5. Select source file containing PSDs to rename
Below shows the results.
Tried running it directly within extend script as well with no luck.
-
8. Re: Photoshop Batch Bulk Print Action Printing Out of Order
Paul Riggott Dec 3, 2012 3:30 PM (in response to perfectblue)That should not have happened!
There is no need to save the script as it can be run from within Extend
-
9. Re: Photoshop Batch Bulk Print Action Printing Out of Order
perfectblue Dec 3, 2012 3:31 PM (in response to Paul Riggott)Yah I ran the code from within extend script itself and I got the same results. Any idea what might be wrong?
-
10. Re: Photoshop Batch Bulk Print Action Printing Out of Order
conroy Dec 3, 2012 3:34 PM (in response to perfectblue)The script operates on filenames beginning with "custommail".
-
11. Re: Photoshop Batch Bulk Print Action Printing Out of Order
Paul Riggott Dec 3, 2012 3:35 PM (in response to perfectblue)Sorry I didn't finish all the text, finger trouble!
Please try this to correct the file names...
var f = Folder.selectDialog( "Please select source folder"); var fileList = f.getFiles("*.psd"); for(var a in fileList){ var nums = decodeURI(fileList[a].name).match(/\d+/); var newName = "CustomMailer_Data Set " + zeroPad(nums,4) + ".psd"; fileList[a].rename(newName); } function zeroPad(n, s) { n = n.toString(); while (n.length < s) n = '0' + n; return n; }; -
12. Re: Photoshop Batch Bulk Print Action Printing Out of Order
perfectblue Dec 3, 2012 5:33 PM (in response to Paul Riggott)@Paul,
Thanks so much that fixed it! I am very grateful for your help and everyone elses in this thread. Thank you again.




