So What Is That .DS_Store File Anyway?

TechJD
1 min readMay 9, 2022
Photo by Alexander Shatov on Unsplash

I’ve got the answer to your burning question. It was actually an issue for me because it kept throwing the count off in my metadata folder for an NFT project. So I did some research on it and wanted to share what I found.

The .DS_Store file, which stands for Desktop Services Store is an invisible file that gets automatically created anytime you open a folder with Finder on the macOS. This file will then follow the folder everywhere it goes, including when it is compressed in a ZIP file.

The .DS_Store file stores the metadata of its containing folder and also the names of other files in the directory. If accidentally shared, you may be exposing private files to be viewed by an outside party.

There are a few ways you can prevent this. The first would be to go into the folder containing the .DS_Store file, open Terminal inside of that folder and execute this command:

rm .DS_Store

You can completely disable the creation of these files by opening Terminal again, and entering:

write com.apple.desktopservices DSDontWriteNetworkStores true

Then restart your computer.

I hope this was helpful!

Source: https://buildthis.com/ds_store-files-and-why-you-should-know-about-them/

--

--

TechJD

Law, programming, and everything in-between! Coming up with fun coding projects with real-world application.