Manually sorting folder contents

I need to manually sort items in a finder folder. They are images to show in a Preview slideshow. I can sort them in the sidebar in Preview but I can't save the order in that app either. What a pain.

Mac Studio, macOS 14.2

Posted on Mar 12, 2024 8:01 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 12, 2024 10:03 AM

JG Here wrote:
I need to manually sort items in a finder folder. They are images to show in a Preview slideshow. I can sort them in the sidebar in Preview but I can't save the order in that app either. What a pain.


You can use Photos or iMovie to create an ordered slideshow, sequencing the photos in any order you want.


If you want to manually order image files in a Finder folder you will have to prepend sequence numbers to the file names.

10 replies
Question marked as Top-ranking reply

Mar 12, 2024 10:03 AM in response to JG Here

JG Here wrote:
I need to manually sort items in a finder folder. They are images to show in a Preview slideshow. I can sort them in the sidebar in Preview but I can't save the order in that app either. What a pain.


You can use Photos or iMovie to create an ordered slideshow, sequencing the photos in any order you want.


If you want to manually order image files in a Finder folder you will have to prepend sequence numbers to the file names.

Mar 12, 2024 8:49 AM in response to JG Here

Sort by what? You don't say.


Let's say I have a folder (Test) of random images on my Desktop. From the Terminal command line with a Zsh shell, I can open Preview with images sorted in ascending order by name, though there are other options:


open -a Preview $(echo ~/Desktop/Test/*(.Non))


Or descending name order:

open -a Preview $(echo ~/Desktop/Test/*(.NOn))


Or limit the number of files passed to Preview. In this case, 5:

open -a Preview $(echo ~/Desktop/Test/*(.NonY5))


Another approach is to place the sorted ascending, full path image names you want into a text file that you provide as follows:


print -l ~/Desktop/Test/*.(png|tif|jpg)(.Non:a) > ~/Desktop/Test/imgList.txt
open -a Preview $(< ~/Desktop/Test/imgList.txt)


And these will open in Preview in that order sorted in the imgList.txt file.


Mar 12, 2024 11:16 AM in response to JG Here

JG Here wrote:

Pretty unbelievable. That's not even close to making sense. I don't know why you continue to argue with me. This is cut and dry.

What doesn't make sense, is why, if you want help, you won't participate in the process. In the time it has taken you to write your non-responsive replies, you could just have given VikingOSX some information. VikingOSX is not the person who is arguing.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Manually sorting folder contents

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.