Managing .DS_Store Files on Network and USB Drives

If you’re tired of macOS cluttering up every folder with hidden .DS_Store files, you can easily disable them for non-local drives using a few Terminal commands.

For Network Drives:

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

For External Media (USB sticks, etc.):

defaults write com.apple.desktopservices DSDontWriteUSBStores -bool TRUE

How to Apply the Changes: For these settings to take effect, you’ll need to either restart your Mac or relaunch Finder (you can do this via the “Force Quit” menu).

How to Undo: If you ever need to revert to the default behavior, simply run the same commands again but replace TRUE with FALSE at the end.

Cleaning Up Existing Files via PowerShell:

"Z:\","Y:\" | % { if(Test-Path $_){ Write-Host "Cleaning $_..." -F Cyan; Get-ChildItem -Path $_ -Include ".DS_Store" -Recurse -Force -EA SilentlyContinue | Remove-Item -Force -Verbose } }

Replace Z or Y with the actual letter assigned to your network map or USB drive (e.g., "D:\","E:\")

No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next