Mac OS X: Disable the creation of .DS_store files

If you access a network share on Windows desktops or server, your Mac leaves .DS_store files wherever you browse. These Mac OS X system files contain data about the directory and are hidden for Mac users. You can deactivate the Writing of .DS_store Files on Networks shares, so your Windows friends will stop complaining.

defaults write com.apple.desktopservices DSDontWriteNetworkStores TRUE

Reboot your Mac or Log out and back in again for the changes to take effect.

Reverting to Default

defaults delete com.apple.desktopservices DSDontWriteNetworkStores

3 thoughts on “Mac OS X: Disable the creation of .DS_store files

  1. The statement above doesn’t work as written, you need to remove the “-bool” operator.
    defaults write com.apple.desktopservices DSDontWriteNetworkStores TRUE

  2. And the statement above has been corrected. Its TRUE that works! Not “true”. Case is sensitive and IMPORTANT! Despite what I’ve read elsewhere online it’s TRUE that prevents those pesky .DS_Score files from appearing.

    PS: You might already have a heap of them…

    In a Windows command line, move into your shared directory and type: “del /S /A:H .DS_Store”

    For example:

    d:\>del /S /A:H .DS_Store

    (Where “d:” is the shared drive file letter).

    PSS: Similar to the above, del /S /A:H FINDER.DAT is also quite a useful command if you have earlier Mac OS’s running over Windows shares.

Comments are closed.