Photoshop: Load Files into Stack sorts lower case letters after upper case

  • 1
  • Problem
  • Updated 6 years ago
  • (Edited)
the Photoshop "Load Files into Stack" script sorts differently when you choose the "folder" option instead of "files." Lower case letters sort after upper case when using the "files" option, and then select multiple files at once. A short demo of the issue is at https://www.youtube.com/watch?v=zPMIRC...
Photo of Adam Wilbert

Adam Wilbert

  • 2 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Paul Riggott

Paul Riggott

  • 359 Posts
  • 144 Reply Likes
That looks as if it is caused by the following lines..
if (File.fs == "Macintosh") // Mac gratiuitously scrambles them...why?
filenames.sort();
Lines 1033 and 1034 in CreateImageStack.jsx

So it looks as if Windows does not do this sort.
Photo of Adam Wilbert

Adam Wilbert

  • 2 Posts
  • 0 Reply Likes
Interesting. The javascript .sort method is case sensitive, so that explains it.

I commented out those two lines and now it pulls in the files in the same order they are in the finder. I can bring them in alphabetically (case insensitive) or sort by date / size etc and they populate the list in Photoshop in the same order. I tried to get it to "gratuitously scramble" them (like the Adobe comment suggests will happen) but couldn't. Maybe this filename.sort line is no longer required.