How to Stop Your Mac From Creating .DS_Store Files on Windows

Each time your Mac connects to a Windows computer, it leaves something behind – a .DS_Store file. This very short guide will show you how to stop that from happening.

windows explorer with an arrow pointing to a .ds_store file


DS_Store files are created in every folder on your Mac. They contain information about that folder, like the position of icons or the way you want files displayed specific to that folder. Since its purpose is to help macOS itself (not you as the user) they’re “hidden” – by starting the file name with a dot (.) If you’d like more detailed information on .DS_Store files, see this Wikipedia article.

The “problem” with those files is that your Mac will create them when you connect to Windows computers as well, and on Windows, those files aren’t hidden. Fortunately, you can stop your Mac from creating them when you’re connected to a Windows computer.

Disable .DS_Store Files on Windows

  1. Open a Terminal by navigating to Applications -> Utilities -> Terminal. Copy and paste the command displayed below into your Terminal and hit enter.

defaults write DSDontWriteNetworkStores true

    the macOS Terminal

  1. Now just sign out of your Mac and back in again (or restart your Mac). From now on when you connect to Windows drives you won’t leave a .DS_Store file behind :)
  2. That’s it!
  3. Note: .DS_Store Files on Windows are not created when you use something like Remote Desktop from your Mac to a PC, only when you connect via SMB.

If this article helped you, I'd be grateful if you could share it on your preferred social network - it helps me a lot. If you're feeling particularly generous, you could buy me a coffee and I'd be super grateful :)

buy a coffee for

Home » Mac » How to Stop Your Mac From Creating .DS_Store Files on Windows

Leave a Comment

Your email address will not be published.