How to stop macOS creating hidden files on network shares/USBs?

Soldato
Joined
25 Nov 2004
Posts
4,788
Location
Hertfordshire
Hopefully someone knows how to stop this happening...

macOS creates files like '._ <filename>' whenever <filename> is accessed or ._DS_Store in folder roots on non-macOS SMB shares or USB drives.

Is there any way to stop this behaviour?

It's really frustrating ending up with loads of duplicate dummy files and I'm not sure if they also potentially cause any configuration issues with some applications that don't ignore the '.' prefix. I also end up with loads of dummy files on the USB sticks and SD cards I use in the car and the car tries to play each one as a media file...
 
Not sure this is the same command on high sierra but it’ll be similar

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

May need to restart finder or reboot afterward.
 
Disable creating '.ds_store' on USB volumes
Code:
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true


Disable creating '.ds_store' on network volumes
Code:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
 
Back
Top Bottom