MacOS – Compressed hidden files are not hidden anymore when uncompressing on Windows

compressionmacoswindowszip

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.

Best Answer

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.