MacOS – Hidden files in archives

archivemacos

When I download any archive file and unpack it, it looks good, but if I copy it to usb stick or lan drive, windows clients see copy of each file with a dot in name. Looks like it's a mac os' system files. How can I disable it? I really don't want to have it in unpacked archives.

Mavericks 10.9.2

Best Answer

You can prevent .DS_Store creation with Asepsis.

At core Asepsis provides a dynamic library DesktopServicesPrivWrapper which gets loaded into every process linking against DesktopServicesPriv.framework. It interposes some libc calls used by DesktopServicesPriv to access .DS_Store files. Interposed functions detect paths talking about .DS_Store files and redirect them into a special prefix folder. This seems to be transparent to DesktopServicesPriv.

As for ._AppleDouble and other such files (including .DS_Store), you can use BlueHarvest. This lets you provide a folder which the app will clean of such files/folders:

Perhaps you need to clean a disk, folder immediately? No problem, simply control-click the disk or folder in the Finder and select “Clean using BlueHarvest”. If your sending zip archives to non Mac users do the same and BlueHarvest will remove the Mac metadata from the archive too. BlueHarvest's "set and forget" preferences are very simple and yet extremely powerful.