Skip to content

Instantly share code, notes, and snippets.

@kmoormann
Created August 15, 2012 16:35
Show Gist options
  • Save kmoormann/3361439 to your computer and use it in GitHub Desktop.
Save kmoormann/3361439 to your computer and use it in GitHub Desktop.
PowerShell delete all items in directory and all subdirectories
function Global:ClearDir([string] $PATH)
{
$AllItemsInPath = $Path + "*"
Remove-Item $AllItemsInPath -recurse -force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment