1

I have a problem with Mac Zip files in exchange with Windows PC. My Mac folder structure looks like that:

Folder

  • File 1
  • File 2

If I create a Zip from "Folder" on a Mac and copy that to the PC and extract it there, the structure looks like this:

Folder

  • Folder
    • File 1
    • File 2

Is it possible to create a Zip on a Mac without having the surrounding Folder on my PC?

1
  • 1
    I think this may be Windows thing. If you create a zip archive on Windows (Select items to zip, right click and "send to > Compressed zip folder") you get a zip archive that acts like a folder. If you then right click on this zip archive and "extract to..." you get a dialog asking where to extract to, with the default being the location of the zip file + a folder named the same as the zip file. You may need to use something other than Windows Explorer to unzip stuff (WinRAR, etc...) as I don't think your issue is related to the Mac. Feb 21, 2022 at 19:14

1 Answer 1

1

If you create a ZIP by using the Compress option in Finder on "Folder" you get a ZIP structured like this:

$ unzip -v test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 02-21-2022 14:07 00000000  test/
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  test/a
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  test/c
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  test/b
--------          -------  ---                            -------
       0                6   0%                            4 files

So if you get an additional folder when unpacking on Windows this rather seems to be a problem with the unzipper there.

You can work around this on macOS by going into the folder, select all the files there and select "Compress" from the context menu. This will create a ZIP file without a parent folder:

$ unzip -v Archive.zip 
Archive:  Archive.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  a
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  b
       0  Defl:N        2   0% 02-21-2022 14:07 00000000  c
--------          -------  ---                            -------
       0                6   0%                            3 files
4
  • Thanks for that answer nohillside! But since I have a lot of folders to compress, I hoped there is a way to do that without selecting the files themself. I already played around with Mac Automator, but my programming knowledge ist just too basic to achive proper results.
    – Alf
    Feb 21, 2022 at 13:29
  • 2
    @alf Maybe best to ask a new question then, describing your specific problem, giving some details about the size of the task, and indicating that you need to have scripting/automation solution.
    – nohillside
    Feb 21, 2022 at 14:02
  • I totally agree, next time I'll write a better description.
    – Alf
    Feb 22, 2022 at 15:54
  • @Alf No worries, a lot of problems need several rounds to get to the bottom of it and find good solutions.
    – nohillside
    Feb 22, 2022 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .