Last active
April 26, 2024 08:31
-
-
Save runxel/41b30528e43317656b36 to your computer and use it in GitHub Desktop.
Powershell script for deleting unwanted apple crap files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# powershell script for deleting unwanted apple crap files – mostly on "infected" USB-sticks | |
# like ._somecrap | |
$theSource = "E:\" # <<<<< insert drive here | |
Get-Childitem $theSource -Include @("._*", ".DS_Store", ".fseventsd", ".TemporaryItems", ".Trashes", ".Spotlight-V100") -Recurse -Force -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment