Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
2
votes
1
answers
2769
views
iCloud mail advanced filter rules
is there a way to add filter rules for an iCloud for example, if the Sender is *test@example.net* and Subject contains "test" then move the mail in "test" and flag it as Spam. I looking for something like what Gmail and Outlook have. In the iCloud mail settings, in the web I only see some primitive...
is there a way to add filter rules for an iCloud for example, if the Sender is *test@example.net* and Subject contains "test" then move the mail in "test" and flag it as Spam.
I looking for something like what Gmail and Outlook have. In the iCloud mail settings, in the web I only see some primitive rules that won't do something like this and can have only one condition.
I want the filters to run constantly not only in the Mac Mail.app or in Thunderbird which would only affect mails that I receive while my Mac is online. They should run all the time so that my mails on my phone also get sorted.
raphiel
(121 rep)
Apr 17, 2023, 02:52 PM
• Last activity: Apr 25, 2025, 04:02 PM
4
votes
2
answers
1621
views
Can I clean up by date created in reverse order?
I have a folder of documents that I want to sort by the date they were created from oldest to newest. I know you can do this in list view, but I really want it to be in icon view. I know that you can clean up by date created from the right-click menu, but that puts the newest files at the top, which...
I have a folder of documents that I want to sort by the date they were created from oldest to newest. I know you can do this in list view, but I really want it to be in icon view.
I know that you can clean up by date created from the right-click menu, but that puts the newest files at the top, which is the opposite of what I want. Any help would be greatly appreciated.
RothX
(523 rep)
Jul 8, 2016, 12:54 AM
• Last activity: Feb 25, 2025, 06:18 PM
0
votes
1
answers
310
views
How do I control the sort function in Photos?
Is there some way to disable the sorting of photos within an album so that I can retain the order of the photos in the manner that I would like?
Is there some way to disable the sorting of photos within an album so that I can retain the order of the photos in the manner that I would like?
HR379
(9 rep)
Sep 26, 2023, 12:50 PM
• Last activity: Oct 20, 2024, 03:08 PM
2
votes
2
answers
260
views
How to sort by comment in Finder?
I have started setting deadlines on a document by putting the date in the comments, using the YYYY-MM-DD format and then what type of deadline it is (I have to submit initial, interim, and discharge reports). It would be helpful if I could sort by comments so it would be in order. Is there any simpl...
I have started setting deadlines on a document by putting the date in the comments, using the YYYY-MM-DD format and then what type of deadline it is (I have to submit initial, interim, and discharge reports).
It would be helpful if I could sort by comments so it would be in order. Is there any simple way to do this? Currently it seems that the only sorting options are name, kind, date, size, and tag.
I'd be open to a third party app if there is a good one that adds this function to the finder.
Jaszzy
(21 rep)
Aug 24, 2020, 08:08 PM
• Last activity: Jun 6, 2024, 11:45 AM
1
votes
2
answers
1107
views
Reverse sorting order in Photos app on Mac OS X
the Photos app on Mac is really nice, but it shows the oldest pictures first, so I have to scroll to the bottom each time I open it... and I have lots of pictures. So my question is: How can I reverse this order and see the newest pictures first? And can I do that across all platforms? Thanks anyway...
the Photos app on Mac is really nice, but it shows the oldest pictures first, so I have to scroll to the bottom each time I open it... and I have lots of pictures.
So my question is: How can I reverse this order and see the newest pictures first? And can I do that across all platforms?
Thanks anyway!
David Gourde
(111 rep)
Jun 19, 2016, 04:23 PM
• Last activity: Apr 21, 2024, 01:06 PM
0
votes
0
answers
26
views
Desktop > Clean Up By > Size : The resulting arrangement makes no sense. Am I missing something?
If I run the action: Desktop > Clean Up By > Size : The resulting arrangement makes no discernible sense. Am I missing something? I have had this problem persist through many macOS updates. I do not know if it is just my computer, if I don't understand what's going on, or if this is a more common pr...
If I run the action:
Desktop > Clean Up By > Size :
The resulting arrangement makes no discernible sense. Am I missing something?
I have had this problem persist through many macOS updates.
I do not know if it is just my computer, if I don't understand what's going on, or if this is a more common problem.
It is only mostly arranged vertically by file type, but that doesn't make sense because there should not be a string of multiple folders in a row when various other files have sizes that should break that sequence up. The folders also aren't even in the right order.
Finder's sort by size feature still works perfectly well.
Desktop > Clean Up By : Also works perfectly fine for every other variable.
JJ123
(1 rep)
Apr 12, 2024, 05:50 AM
1
votes
1
answers
162
views
Force Music app to sort with prefixes (“The”, “A”, “An”, etc.)
Back in the ol'days In iTunes package, there was a file called `SortPrefixes.plist` in localisation folders containing several sort prefixes (“The”, “A”, “An”, etc.). Removing them in this file was making iTunes to auto-sort everything including these prefixes (_The Chemical Brothers_ was listed at...
Back in the ol'days In iTunes package, there was a file called
SortPrefixes.plist
in localisation folders containing several sort prefixes (“The”, “A”, “An”, etc.). Removing them in this file was making iTunes to auto-sort everything including these prefixes (_The Chemical Brothers_ was listed at T and not C).
(I have a _lot_ of music files and I don't want to fix this by adding a _Sort Artist_ to each of them.)
In the new Music app, there is no such file in Localisation folders, but I've just found a similar one in /System/Library/PrivateFrameworks/AMPLibrary.framework/Versions/A/Resources/XX.lproj/SortPrefixes.strings
, containing the same samples of prefixes.
Since AMPLibraryAgent is managing libraries for Music.app and TV.app, I believe I might be on the right track and I'm tempted to clear them. But these files are stored in /System/Library/
so I don't want to mess with the system: does it sound quite safe?
(It [doesn't look like](https://www.google.com/search?q=%22AMPLibrary.framework%22%20%22SortPrefixes.strings%22) a known trick yet.)
Joan
(259 rep)
Jul 15, 2022, 10:48 AM
• Last activity: Dec 26, 2023, 04:07 PM
1
votes
2
answers
351
views
zsh - Sort files expansion in MacOS Terminal like in Finder: numerically and case-insensitively
Is it possible in MacOS Terminal to have the sort order numerically and case-insensitively, almost like in Finder? I'm on MacOS 14 Sonoma, using Terminal app with zsh 5.9 and oh-my-zsh. I'm trying to execute some command line for all files in a specific folder. Please compare: | My desired sort orde...
Is it possible in MacOS Terminal to have the sort order numerically and case-insensitively, almost like in Finder?
I'm on MacOS 14 Sonoma, using Terminal app with zsh 5.9 and oh-my-zsh.
I'm trying to execute some command line for all files in a specific folder.
Please compare:
| My desired sort order | MacOS Finder sort by name order |
| -------- | -------------- |
| bar.jpg
bar-2.jpg
bar-10.jpg
foo.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
STA.jpg
STA-3.jpg
STA-20.jpg | bar-2.jpg
bar-10.jpg
bar.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
foo.jpg
STA-3.jpg
STA-20.jpg
STA.jpg | The Finder way would be fine, but not ideal, as it leaves *foo.jpg* below *foo-1.jpg* Here are commands I tried: | for file in *; do echo $file; done | for file in *(n); do echo $file; done | | -------- | -------------- | | STA-20.jpg
STA-3.jpg
STA.jpg
bar-10.jpg
bar-2.jpg
bar.jpg
foo-1.jpg
foo-10.jpg
foo-2.jpg
foo.jpg|STA-3.jpg
STA-20.jpg
STA.jpg
bar-2.jpg
bar-10.jpg
bar.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
foo.jpg | The latter brings in numerical sort order and is the closest I could get to Finder, but leaves uppercase *STA** files above lowercase *bar** ones. I tried to use glob qualifier cause it looked like the simplest syntax, but if it's not achievable – please suggest other ways to execute commands on multiple files after sorting them the way I want.
bar-2.jpg
bar-10.jpg
foo.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
STA.jpg
STA-3.jpg
STA-20.jpg | bar-2.jpg
bar-10.jpg
bar.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
foo.jpg
STA-3.jpg
STA-20.jpg
STA.jpg | The Finder way would be fine, but not ideal, as it leaves *foo.jpg* below *foo-1.jpg* Here are commands I tried: | for file in *; do echo $file; done | for file in *(n); do echo $file; done | | -------- | -------------- | | STA-20.jpg
STA-3.jpg
STA.jpg
bar-10.jpg
bar-2.jpg
bar.jpg
foo-1.jpg
foo-10.jpg
foo-2.jpg
foo.jpg|STA-3.jpg
STA-20.jpg
STA.jpg
bar-2.jpg
bar-10.jpg
bar.jpg
foo-1.jpg
foo-2.jpg
foo-10.jpg
foo.jpg | The latter brings in numerical sort order and is the closest I could get to Finder, but leaves uppercase *STA** files above lowercase *bar** ones. I tried to use glob qualifier cause it looked like the simplest syntax, but if it's not achievable – please suggest other ways to execute commands on multiple files after sorting them the way I want.
Dmitrii Kuznetsov
(63 rep)
Nov 14, 2023, 08:41 PM
• Last activity: Nov 15, 2023, 10:22 PM
2
votes
1
answers
164
views
Sorting mail.app subfolders
My iMac (macOS Monterey 12.6.6) runs Mail.app 16.0. Mail.app has a number of subfolders within a user-created folder called "Old Trips.” Each subfolder contains emails relating to a specific journey. I would like to sort these subfolders so the subfolders list in the order of their creation, that is...
My iMac (macOS Monterey 12.6.6) runs Mail.app 16.0. Mail.app has a number of subfolders within a user-created folder called "Old Trips.” Each subfolder contains emails relating to a specific journey.
I would like to sort these subfolders so the subfolders list in the order of their creation, that is, with the most recent trips on top and the oldest trip at the bottom. A friend suggested renaming each of the subfolders with a unique starts-with-a-number name. I tried that, but even after quit and macOS restart no sorting occurred.
Is there another way to accomplish this sort?
DavidRecallsMonica
(2594 rep)
May 26, 2023, 02:50 PM
• Last activity: May 26, 2023, 05:14 PM
2
votes
3
answers
1575
views
How can I reproduce the Finder sort order without asking Finder to sort for me?
I work with a large collection of mostly-text files subdivided by series, periodically mirroring them from an upstream repository and repackaging them using a shell script from a slightly chaotic source organization into more orderly and compact forms. The sources are collected in directories of fil...
I work with a large collection of mostly-text files subdivided by series, periodically mirroring them from an upstream repository and repackaging them using a shell script from a slightly chaotic source organization into more orderly and compact forms. The sources are collected in directories of files for each series numbering from a handful to hundreds per set, with a semi-orderly human-oriented naming convention dating back to the 90's with this general pattern:
multi-word-series-name[-$subsetnumber]-$docnumber[.{txt,html,pdf}]
Where a series may or may not have subsets, subsets may be numbered with roman or arabic numerals, a series may start with numbered docs in no subset and later get a subset labeled "II" or "2", and so on. These names work well for people using them from the Finder, which in most cases orders them in a human-sensible way and detects that name-II-1 comes later than name-6 and that name-2 does not come after name-19. Because my repackaging consists of assembling the latest version of each series into single files in their human-rational order, I use a simple bit of AppleScript that uses the Finder to sort the names of the items in a given directory. This yields correct results, but it is spectacularly inefficient for reasons I don't understand. The AppleScript is:
on run argv
set op to ""
set upath to POSIX file argv as string
tell application "Finder"
set foo to every item of folder upath
set foo to sort foo by name
repeat with curfile in foo
set thisname to the name of curfile
set op to op & " " & thisname as string
end repeat
end tell
return op
end run
(And no, I don't recall why I did it that way. I wrote it circa 2008 and I mostly hate AppleScript...) This is compiled into a script named "flist.scpt" and run from my shell script with "osascript flist.scpt /path/to/series/folder/". The result of running that script with a directory that has 26 files in it is to peg the cpu for over 2 minutes. For comparison, 'ls' gives lexically sorted results on the same machine (a G5 iMac running Leopard... don't laugh, it's a utility machine) in 0.008s *with the script chewing on the same directory in the background.*
I'm looking to get rid of that AppleScript altogether, but I have not found a way to reproduce the Finder sort logic easily, i.e. by setting a locale or giving some complex arguments to 'sort' that will order the names correctly. My fallback solution if I can't find something canned to do this will be to reproduce the Finder logic myself in some evil mix of sort, sed, awk, and shell, but I'd really like to avoid that if possible. If there's something goofy about my AppleScript that is causing the horrid performance, fixing that would be almost as good as a magic incantation to 'ls' to make it sort like the Finder.
**UPDATE: SOLVED!**
I first tried the Perl Sort::Naturally module, but it sorted labeled-subset names ahead of the implied subset "I" members, which isn't what I wanted. So I went ahead and dove into writing my first Ruby script, after hacking a fix into the Leopard Ruby config to make 'gem' work in the modern world and installing the naturalsort gem. The replacement Ruby script (called with a directory name as an argument) is:
#! /usr/bin/env ruby -rubygems -KU
# Largely cargo-culted from stackexchange response.
# I dunno what exactly the shebang line opts to ruby do. Probably pwn me.
# My first Ruby script ever. Don't laugh too hard.
require 'natural_sort' # gem install naturalsort
dname = ARGV
input = Dir.entries(dname)
puts NaturalSort.naturalsort(input)
The minor differences in output are that this includes the . and .. entries and delimits entries by line rather than with spaces, but as this is being called from a shell script that already filters out some special names these are trivial to handle.
Bill Cole
(550 rep)
Oct 8, 2012, 03:55 PM
• Last activity: May 25, 2023, 10:32 AM
7
votes
2
answers
2322
views
Bad sort order in file picker, correct in Finder
Say I download a bunch of random files in Safari for upload to some other website. The files automatically end up in my Downloads folder, so it would make sense to sort the files by **Date Added** so the stuff I just got will be at the top of the list for easy selection. Problem is, this doesn't hap...
Say I download a bunch of random files in Safari for upload to some other website. The files automatically end up in my Downloads folder, so it would make sense to sort the files by **Date Added** so the stuff I just got will be at the top of the list for easy selection.
Problem is, this doesn't happen. In fact, I don't see any rhyme or reason to what I'm getting here:
Note that I'm sorting by Date Added, descending, so the items from today should be at the top of the list. Instead they're halfway down the bottom and jumbled in with a bunch of other items. Under a "2012" heading. For a file that was downloaded *today*.
If I open the Downloads folder up in Finder and apply the same sort, the files appear correctly:
This strange behavior happens in every application that uses the system file picker.
Any idea what's causing this and how to fix it?


Mikey T.K.
(2887 rep)
Jan 15, 2014, 11:21 PM
• Last activity: May 12, 2023, 02:11 PM
1
votes
0
answers
173
views
Finder.app : Sort by Extension
### Question How could I **Sort by Extension** in **Column View** (as a standard view, not as a search) using the Finder.app (*as opposed to an [alternative Finder.app][1]*)? ### Sleuthing Existing information mostly concerns itself with: - **Sort By Kind** is interchangeable with **Sort by Extensio...
### Question
How could I **Sort by Extension** in **Column View** (as a standard view, not as a search) using the Finder.app (*as opposed to an alternative Finder.app *)?
### Sleuthing
Existing information mostly concerns itself with:
- **Sort By Kind** is interchangeable with **Sort by Extension**. Not sufficiently so. (1) (2) (3)
- **Sort by Extension** is available via search. But not as a standard view. (1) (2) (3)
- **Sort by Extension** is available via a third-party Finder app. (1)
- **Sort by Extension** cannot be accomplished in Finder.app, so provide feedback here
(Note: Choose macOS - Finder.app is a category in that form). (1) (2)
### Background
The **Finder.app** > **Column view** > **Sort by Kind** sort order, seen below, does not appear to sort by extension:
![Screenshot of a Finder window in Column view ][9]
Comments below confirmed that **Sort by Kind** does not sort by extension, leaving the sort order sort of (*kind of?*) arbitrary in Column view.
kando
(251 rep)
Mar 7, 2023, 04:59 PM
• Last activity: Mar 8, 2023, 04:50 PM
1
votes
0
answers
23
views
Finder.app : Sort by extension (not by kind)
Is it possible in Finder.app to sort by file extension rather than kind?
Is it possible in Finder.app to sort by file extension rather than kind?
kando
(251 rep)
Mar 7, 2023, 06:02 PM
2
votes
1
answers
555
views
Dock folder shortcut: Is it possible to change the sort order of files in subfolders?
I have a shortcut to a folder in the Dock. Here is how this folder is configured: This folder contains several subfolders. When I enter a subfolder by hovering the mouse cursor over a subfolder title, the files in the subfolder are, by default, listed in ascending order by Name. Changing the *"Sort...
I have a shortcut to a folder in the Dock.
Here is how this folder is configured:
This folder contains several subfolders. When I enter a subfolder by hovering the mouse cursor over a subfolder title, the files in the subfolder are, by default, listed in ascending order by Name.
Changing the *"Sort by"* value in the above context-menu only affects the order of the items in the folder itself, not those in its subfolders.
Is it possible to change the ordering method of the files in the **subfolders** (e.g., to *descending* order by Name or Date Modified)?
Note: This question is strictly concerned with the order of files in the Dock pop-up mini-window in List view, not a proper Finder.app window.
----------
OS X El Capitan, version 10.11.6.
----------

rubik's sphere
(5750 rep)
Jul 12, 2018, 01:16 AM
• Last activity: Jan 15, 2023, 04:32 PM
1
votes
0
answers
262
views
Sorting files in dock folder
I'm runninγ macOS 10.15.3 (Catalina) and have noticed this behavior. I have my documents folder in the dock with the following options: - Sort by: Kind - Display as: Folder - View content as: List The important thing to note here is the first one, the sort by option. The files in the documents folde...
I'm runninγ macOS 10.15.3 (Catalina) and have noticed this behavior.
I have my documents folder in the dock with the following options:
- Sort by: Kind
- Display as: Folder
- View content as: List
The important thing to note here is the first one, the sort by option.
The files in the documents folder are correctly sorted by kind, however, navigating through folders within this documents folder, that sorting just returns to alphabetical.
Within Finder, I have sorting set to kind anyway, but obviously this must be unrelated.
Is there a way to keep sort by kind set for navigating through the dock folder view? Or is this a bug?
ACS
(11 rep)
Mar 27, 2020, 11:17 AM
• Last activity: Jan 14, 2023, 07:16 PM
3
votes
1
answers
3216
views
Sorting files on extension (kind) and then date in Finder? (Mojave)
When viewing a folder in Finder, by clicking the different column headings you can select how you want the folder contents sorted: by name, kind (extension), modified date, et cetera. What I would like is to see is all files of a certain kind grouped together, and then sorted on date. For example, a...
When viewing a folder in Finder, by clicking the different column headings you can select how you want the folder contents sorted: by name, kind (extension), modified date, et cetera.
What I would like is to see is all files of a certain kind grouped together, and then sorted on date. For example, all .jpg files sorted on date, then all .txt files sorted on date, and so on.
So something like a 'combined' sorting criterium, where kind or filetype takes higher precedence, and then (for files with the same extension) date, and perhaps even more criteria.
Is this possible in Finder? Can I perhaps even define or customize my own 'sorting rules' ?
In case it matters, I'm using macOS 10.14 Mojave.
RocketNuts
(1529 rep)
Oct 3, 2018, 09:49 AM
• Last activity: Dec 29, 2022, 04:22 AM
1
votes
1
answers
147
views
How to get "ls" and "sort" commands to reproduce Finder.app sorting using LC_COLLATE
In Apple Finder.app special characters come before numerals which then are followed by alpha characters. It appears this is called "Natural Sort Order". **EDIT** To clarify, I am using `ls` because I am trying to copy file names from Finder to a text document and have them sorted as Finder sorts . T...
In Apple Finder.app special characters come before numerals which then are followed by alpha characters. It appears this is called "Natural Sort Order".
**EDIT**
To clarify, I am using
ls
because I am trying to copy file names from Finder to a text document and have them sorted as Finder sorts .
To test I created 7 files with the names below using touch {[,1,2,3,A,B,C,}
[
1
2
3
A
B
C
Using ls -f
the bracket ends up after numerals and before alpha characters instead of at the beginning.
0-zsh% ls
1 2 3 A B C [
0-zsh% ls -f
. .. 1 A C 3 [ B 2
I have tried changing the locale
in the shell without luck.
This is my locale:
0-zsh% locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
These are possible english locale options
0-zsh% locale -a | grep -i en
en_NZ
en_US.US-ASCII
en_US.UTF-8
en_NZ.ISO8859-1
en_AU.US-ASCII
en_US
en_NZ.UTF-8
en_AU.ISO8859-15
en_US.ISO8859-15
en_NZ.ISO8859-15
en_AU.UTF-8
en_CA
en_NZ.US-ASCII
en_GB.ISO8859-1
en_CA.US-ASCII
en_CA.ISO8859-15
en_US.ISO8859-1
en_GB.UTF-8
en_GB.US-ASCII
en_AU
en_GB
en_CA.UTF-8
en_IE.UTF-8
en_CA.ISO8859-1
en_AU.ISO8859-1
en_IE
en_GB.ISO8859-15
https://www.engadget.com/2008-06-24-mac-101-finder-filename-sorting.html
John
(1248 rep)
Oct 17, 2022, 11:40 PM
• Last activity: Oct 19, 2022, 02:22 PM
5
votes
2
answers
3536
views
Change Finder sort from descending to ascending in anything but list view?
Is it possible to change the sort order when viewing files in Finder in the symbol, column or slideshow view? I am going through pictures and sorting them by creation date. For some reason, the default is that the latest creation date is on top, so descending sort order. When I switch to list view a...
Is it possible to change the sort order when viewing files in Finder in the symbol, column or slideshow view?
I am going through pictures and sorting them by creation date. For some reason, the default is that the latest creation date is on top, so descending sort order. When I switch to list view and change it by clicking on the column header, and switch back to any other view, it is the default again.
It seems really strange that this basic option is not possible. Am I missing something?
Klausette
(151 rep)
Oct 17, 2021, 05:19 PM
• Last activity: Oct 9, 2022, 05:03 PM
0
votes
0
answers
176
views
Mark unsorted recents photos in iPhone
I've a habit of sorting all my 'recent' photos into different local albums on my iPhone. I've 30,000+ photos in 'recent' album and NOT all are sorted in various local albums. How can I mark the photos in 'recent' albums, all the photos which are NOT sorted/present in any other existing local album?...
I've a habit of sorting all my 'recent' photos into different local albums on my iPhone. I've 30,000+ photos in 'recent' album and NOT all are sorted in various local albums.
How can I mark the photos in 'recent' albums, all the photos which are NOT sorted/present in any other existing local album?
After marking those unsorted photos from 'recent' album, I will easily sort it out to various local albums and stay organised.
Secondly, I'd like all my iPhone photos albums to be synced with macOS Photos app albums without duplication. How is that possible without using third-party tools?
Shah-G
(111 rep)
May 14, 2022, 11:17 AM
• Last activity: Sep 16, 2022, 12:13 PM
0
votes
0
answers
1875
views
How to auto-sort a table in Numbers?
I'm trying to get Numbers to "auto" sort a table when data is entered into a different table. It's for a simple round robin tennis tournament, where points are accumulated each round, and I'd like to have the players ranked after each round based on Total Points. I've used RANK and it's working perf...
I'm trying to get Numbers to "auto" sort a table when data is entered into a different table.
It's for a simple round robin tennis tournament, where points are accumulated each round, and I'd like to have the players ranked after each round based on Total Points.
I've used RANK and it's working perfectly to calculate the results, however, the ranking table doesn't automatically sort via the Rank Column when a new value is added in the main table on the left.
This spreadsheet is being used on an iPad and the games are just 12 minutes long. So, it's not practical to have the players having to sort the column every time.
Is there a formula or trigger / procedure I can use that will monitor the Rank column and sort it when new data is entered on the left?

Alinoz
(1 rep)
Sep 16, 2022, 09:52 AM
• Last activity: Sep 16, 2022, 11:39 AM
Showing page 1 of 20 total questions