Batch result folder not in same order as source folder

New Here ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Hi! I am running a batch on a folder with 15 images, they are being resized. The images are in the original folder, labeled "A" and are in Name order. When I run the batch, I set to extension with two digits, and I place a letter in fron so they come out like "A01" and "A02" sequentially. When they come out of the batch into the result folder, they are not in the same order as the original folder. They seem to be randomly scattered all about. They come out correctly labeled as "A01, A02..." etc but it is not in the same order as the original folder. I have no idea why it does this. I have tried other variations and many different batches, but it is always the same result. Does anyone know why or can offer any kind of support for this? Thank you!!

TOPICS
Actions and scripting , macOS

Views

49

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Hi Brian!

 

I had the same issue a while back.

In a batch Photoshop can load & treat your pictures accoridng to the unicode value of the characters in your filename.

As an example:

the unicode value of...

  • "A" = 0041
  • "a" = 0061

 

The filenames is somehow converted to to a sum of the unicode values of the characters.

so if we have AAAA.jpg & aaa.jpg, it results in 164 (4*A = 4*41) & 183 (3*a = 3*61)

 

Doesn't matter that we see in explorer, the unicode "something something" determines order.

 

Hope this helps. 🙂

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Wow... Are you 100% sure? In that case: thanks 🙂  That could suck for some people running huge batches, I guess.

So you could possibly solve it by renaming the files numerically? (but you would lose your filename, unless using a number in front of the filename could somehow overpower the sum of how you are describing it).

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Pretty sure. 🙂

 

If I understood correctly: at the end of the batch there are 2 folders with files: Source & destination.

OP says order of files in destination =/= order of files in source.

I had that happen to me when I batched images where I generated the destination name in the Photoshop script itself.

 

What I did to workaround it was:

  • count the number of files in source
  • load the paths/files in an array & sort them (that way, at least you know what's happening and can debug to change the order)
  • write a loop over the array contents
  • inside the for call the function for every file in the array

 

It really wasn't too much extra work and it got the job done. There's probably more elegant ways, but hey. 🙂

it w

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Sounds cool to me! Now you will always know what's happening (until they take away the old scripting...).

I was just thinking one might add that to the Image Processor Pro code, if it's doing the same thing as PS. A Script Master could even add a dropdown for sorting order.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

LATEST

Davide Barranca once said he estimated at least a couple more years... 🙂

Reality has a knack for extending deadlines.

We'll see when it happens. Meanwhile, there's a lot of great stuff coming out already.

Alchemist plug-in is hella fun to play with! ❤️

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

It feels like there's an aspect here where you want PS to read your mind? What if my opinion is that your folder should be sorted by size and I set it so? Do you feel that PS Batching should pick up on this and use that order? I guess that would be nice 🙂 I'm not sure how it's doing it now; probably by name and/or by date.
Maybe if you are viewing the folder sorted by name, and PS batches by date, then yes... I guess these labels will end up on the wrong files. If you had the reverse problem, you could use a file renaming tool first to force the order.
I'm not 100% clear on the question or your thinking, so someone else may be able to help you...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

You could also try if Image Processor or Image Processor Pro do it the same way...

Image Processor Pro 

It think we are allowed to tinker with that code, so maybe you could ask to have it modified by one of the Script Masters here.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines