What exactly is the .DS_Store file?Solved

Participant
Discussion
3 months ago

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?

Hidden .DS_Store files found on macOS devices

Replies (5)

Marked SolutionPending Review
Participant
3 months ago
Marked SolutionPending Review

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.

Marked SolutionPending Review
Participant
3 months ago
Marked SolutionPending Review

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.

Marked SolutionPending Review
Participant
3 months ago
Marked SolutionPending Review

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 

Marked SolutionPending Review
Participant
3 months ago
Marked SolutionPending Review

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.

Marked SolutionPending Review
Participant
3 months ago
Marked SolutionPending Review

Good to know. I’ll be adding that step to my prep process going forward. It saved me a bit of embarrassment this time.

Save