Skip to content

ds_store_disable_macos.sh

Corey Watson edited this page Dec 1, 2025 · 1 revision

ds_store_disable_macos.sh

Prevents macOS from creating .DS_Store files on network shares.

Overview

This script disables the creation of .DS_Store files on network-mounted volumes. These files contain folder metadata and can clutter network drives, especially on mixed OS environments.

Purpose

Prevents macOS from creating .DS_Store files on network shares. These files contain folder metadata and can clutter network drives.

Prerequisites

  • macOS
  • No special privileges required

Configuration

Required Inputs

None

Behavior

Sets DSDontWriteNetworkStores to true in com.apple.desktopservices preferences. This prevents macOS from creating .DS_Store files when browsing network-mounted volumes.

Note: Requires logout/login or reboot to take effect.

Security Notes

  • No special privileges required
  • Only modifies user preferences
  • No sensitive information logged

Exit Codes

  • 0 = Success
  • 1 = Failure

Example Output

[ DISABLE .DS_STORE ON NETWORK SHARES ]
--------------------------------------------------------------
 Setting applied: DSDontWriteNetworkStores = true

 NOTE: Log out and back in (or reboot) for changes to take effect.

[ SCRIPT COMPLETED ]
--------------------------------------------------------------

Version History

  • v1.0.0 (2024-12-01) - Initial release - migrated from SuperOps

Links

Clone this wiki locally