As of macOS 10.14.6 (maybe since 10.14.0) I noticed that when I zip files directly within Finder (Select files, right click, compress) that the resulting Archive.zip contains the selected files but in another order than shown in Finder. Sort order in finder: alphabetically (by Name, ascending). Sort order in zip: i don't know what order it has...

How can I set the sort order in ZIPs back to alphabetically?


1) This is the order in the Finder:

enter image description here

2) This is the order in the ZIP file when using macOS 10.14.6 compression (select all, right click, compress): So the order is 4 - 2 - 3 - 1 (instead of 1 - 2 - 3 - 4)

enter image description here

3) Here is the order in the ZIP file when using KeKa: enter image description here

I hope my question is clear now and we can avoid unnecessary "why is this important" comments... Thanks!

  • I guess, the destination would have a different sort order, instead of the zip itself. I see zips as just carriers. – anki Sep 30 '19 at 12:02
  • 1
    @Tetsujin: Terminal: unzip -l filename.zip (when I zip with KeKa, the sort order is still good, when using the MacOS Compressor (Archive Utility, right-click out of Finder), the sort order is wrong. – basZero Sep 30 '19 at 12:47
  • 3
    Perhaps if I stick my beak in @basZero: IN DETAIL explain why the order inside the zip file is in any way important. If you need "the first item" to be unzipped first, WHY? We are not being argumentative but if we understand all of the reasons (other than "it offends my sense of order") then we can figure out (at least) an alternative. – Steve Chambers Sep 30 '19 at 13:00
  • 1
    @basZero "And in some cases it might be important that the first is the first as seen originally in the Finder": That's exactly what we are wondering about here. In which cases is it important? Also, even in Finder, the order of files on disk may differ from what you see within a Finder window. So overall sort order is arbitrary and doesn't reflect the physical order on disk. – nohillside Sep 30 '19 at 13:11
  • 2
    Per the ZIP file specification 4.3.3 Files MAY be stored in arbitrary order within a ZIP file. and The entries in the central directory MAY NOT necessarily be in the same order that files appear in the .ZIP file. You might just be seeing implementation details. – vykor Sep 30 '19 at 13:27

You must log in to answer this question.

Browse other questions tagged .