Featured image of post A Simple Command to Batch Delete .DS_Store Files Using PowerShell

A Simple Command to Batch Delete .DS_Store Files Using PowerShell

Explains how to use PowerShell to batch delete Mac's .DS_Store files, which tend to be a nuisance in a Windows environment, including those in subfolders. You can easily clean up unnecessary files with a single short command.

Move the current directory to the target folder, and execute the following command to bulk delete .DS_Store including subfolders.

1
Get-ChildItem . -include '.DS_Store' -Recurse -Force | Remove-Item -Force
comments powered by Disqus