Why can't I force files starting with '!' to the top of a list in folders?

Why can I no longer force file names starting with an ! to the top of a list of files? I can order folders using this system but when I look inside a folder the file names starting with an ! are at the bottom, defeating the whole object.


[Re-Titled by Moderator]

iPhone 12, iOS 18

Posted on May 30, 2025 12:32 AM

Reply
3 replies

May 30, 2025 07:47 AM in response to CheesedOffWithIT

It all depends on the sort order that you have in place.

Different folders can have different orders.


It is certainly not just the "!", is it?


The exclamation mark "!" comes before every letter in the ASCII order, so when ordered by name it might look something like this example:


!x
!y
A
B


but if you click the Name column it will reverse the order:


B
A
!y
!x


It is possible also that you have it ordered by kind, or by date, etc.


An example screenshot may clarify.

Jun 16, 2025 06:01 AM in response to CheesedOffWithIT

If I want files or folders to appear first in a folder, or even a sub-folder, I prefix them with an underscore. That character is UNIX friendly when one is in the Terminal, while a file preferenced with a bang (!) from the Finder cannot be directly accessed in the Terminal and must be escaped to be seen or accessed:

ls !foo.txt
zsh: event not found: foo.txt

ls \!foo.txt
!foo.txt


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.

Why can't I force files starting with '!' to the top of a list in folders?

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