1

When I zip hidden files and folder and unzip on a Windows PC, they do not remain hidden. I tried to hide them with dot and also with the command chflags hidden.

Is there anything I can do? It happens only when sending Mac to Windows, Mac to Mac works fine.

2

The filesystem running on macOS and Windows handles hidden files differently. The two approaches, i.e. prepending a dot . character to filename or using chflags hidden won't work as it will set the file as hidden on Mac and not on Windows.

The filenames prepended with . will remain hidden on any UNIX/Linux system.


You can hide files on Windows by getting properties on a file and checking the "hidden" box on the general tab. This will only hide a file if you don't change the default behavior of Windows Explorer to keep hidden files hidden.

  • Oh I see. Thank you Nimesh. Is there anything to keep these files hidden when unzipping on Windows? – TryingTrying Jan 20 at 13:52
  • @TryingTrying no there is not as I think zip files do not contain anything to mark a file as hidden except the file name for Unix. – user151019 Jan 20 at 15:09

You must log in to answer this question.

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