Unable to prevent .DS_Store & ._ files external drives Catalina

I seem to be unable to stop .DS_Store and ._ files from being created when copying files and folders to windows and google drives. I have tried the following terminal commands (with restarts) suggested with no luck.


defaults write com.apple.desktopservices DSDontWriteNetworkStores true

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true


Does this no longer work with Catalina? I couldn't find any confirmed recent solutions.

Software like Blueharvest may work for the windows drive, but not for google drive.


I am using the windows drive (ExFAT) for GIS analysis on a virtual machine (VMware Fusion, Windows 10, Arc GIS) and it's extremely annoying to wade through all of the extra files.

The .DS_store files are also created when I upload to google drive for my collaborators. I then have to go through and delete them individually from every folder.


This is all very frustrating and inefficient. Does anyone have a solution besides purchasing a PC?

Thank you.


OS 10.15.5

Macbook Air 2017

1.8 GHz dual i5

8 GB ram

MacBook Air 13″, macOS 10.15

Posted on Jun 24, 2020 11:24 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 24, 2020 12:14 PM

When you access a mounted drive from the Finder, the .DS_Store file is written in every folder that you descend into. This is normal for the Finder, and there is no suppressing the .DS_Store file creation. This would not happen if you did everything in the Terminal application though. 😎


There is a tool included with macOS by the name of dot_clean. There is a man page for it in the Terminal, and it will recursively remove certain dot underbar files.


man dot_clean
/usr/sbin/dot_clean -m /Volumes/STUFF


I do this regularly with a USB stick named STUFF that has n-tuple folders on it.

Similar questions

5 replies
Question marked as Top-ranking reply

Jun 24, 2020 12:14 PM in response to B_Forester

When you access a mounted drive from the Finder, the .DS_Store file is written in every folder that you descend into. This is normal for the Finder, and there is no suppressing the .DS_Store file creation. This would not happen if you did everything in the Terminal application though. 😎


There is a tool included with macOS by the name of dot_clean. There is a man page for it in the Terminal, and it will recursively remove certain dot underbar files.


man dot_clean
/usr/sbin/dot_clean -m /Volumes/STUFF


I do this regularly with a USB stick named STUFF that has n-tuple folders on it.

Jun 25, 2020 2:18 PM in response to VikingOSX

VikingOSX-


Thanks for the reply.

Running dot_clean does in fact remove the ._* files from the drive, although I had to modify the command line to

"dot_clean /Volumes/ExFAT" for it to work. I'm a terminal novice, and I couldn't find what "-m" does. Don't know if that was the issue or that my path doesn't include my user name.


This still does not solve the .DS_Store file issue. I'll just have to keep manually removing them.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to prevent .DS_Store & ._ files external drives Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.