OS X Tip - Avoiding ‘.ds_store’ Files on Network Drives

2 minute read

Mac OS X by default leaves behind a file named ‘.DS_Store’ in every directory that is opened on a Non-Mac filesystem using the Finder application. This is especially annoying on network drives and external media like Compact Flash or SD cards.

What is in those files? Finder uses them to store meta-data about its display of the folder, like the current display mode, position and order of Icons etc.

However, not only do I find those files annoying, I don’t even necessarily want to preserve the order or position of the icons in a folder display. I’d much rather have the view reset the standard when I reopen the folder.

Luckily, it is easy to prevent the creation of said files on remote storeage drives.

To this end, just run the following command in the Terminal window:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

The setting takes effect from the next login, and is specific to the user account the ‘defaults’ command is executed as. Consequently, it is best to repeat the setting for all user accounts.

By the way, here is the link to the original post from Apple that lead me to this solution: http://support.apple.com/kb/ht1629.

Unfortunately, the entire thing only works for network drives at this point. I am still looking for a solution for local drives…