While organizing some project folders to send to a client, I noticed a hidden file named .DS_Store popping up in almost every directory. At first, I thought it was some kind of virus or leftover system junk, but it kept reappearing, even inside zipped folders I was preparing on my Mac. Can anyone tell me what it is?
What exactly is the .DS_Store file?Solved
Tags
Replies (5)
Yeah, I’ve run into that too when prepping files for shared drives. Turns out it was .DS_Store (Desktop Services Store). macOS creates it automatically when you open a folder in finder. It keeps track of how you view a folder, like icon positions, window size, and view settings.
Oh okay. But the annoying part is that when I transferred the zip to a windows system, those .DS_Store files were visible and it confused the client.
Totally understandable. If you’re sending files to someone not using a mac, it’s better to clean those up first. You can open terminal, navigate to the folder, and run:
rm .DS_Store
And if you’re dealing with shared network folders or external drives regularly, you can stop macOS from creating those files on network volumes with this command: defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Just make sure to restart your mac afterward.
Good to know. I’ll be adding that step to my prep process going forward. It saved me a bit of embarrassment this time.