Skip to main content
Participating Frequently
January 25, 2022
Question

I'm looking for a script or a way to open the next image in sequence (alphabetically) in a folder.

  • January 25, 2022
  • 2 replies
  • 383 views

I'm looking for a script or a way to open the next image in sequence (alphabetically) in a folder.

This topic has been closed for replies.

2 replies

Kukurykus
Legend
January 25, 2022

Wouldn't be Batch sufficient, or you have some manual tasks to do on each open image?

Stephen Marsh
Community Expert
Community Expert
January 25, 2022

@ivan22179185arms wrote:

I'm looking for a script or a way to open the next image in sequence (alphabetically) in a folder.


 

It may help for you to add some more detail/context. 

 

Have you tried:

 

.sort()

 

or:

 

.sort().reverse()

 

As in (snippet for context, not full working code):

 

var inputFolder = Folder.selectDialog("Select the image folder:");
var fileList = inputFolder.getFiles(/\.(jpg|jpeg)$/i);
fileList.sort();

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/opening-images-in-reverse-order/m-p/11294160

 

Participating Frequently
January 25, 2022


I don't think you understood exactly what I wanted, I didn't either myself. But I found a solution,thank you anyway!

Stephen Marsh
Community Expert
Community Expert
January 25, 2022

@ivan22179185arms wrote:


I don't think you understood exactly what I wanted, 


 

That is why I asked for more information, I had to take a guess and it looks like I guessed wrong :]

 


@ivan22179185arms wrote:


I didn't either myself. But I found a solution,thank you anyway!



I'm now guessing that you are working on a single file from a specific directory/folder, you wish to close/save the open file and then have the next alphabetically sorting file in the same directory opened.

 

Please put me out of my misery and share, the suspense is killing me! :]

 

Providing the solution will help others looking for an answer to the same issue.