Skip to content

Instantly share code, notes, and snippets.

@hekystyle
Created October 9, 2025 12:46
Show Gist options
  • Select an option

  • Save hekystyle/97b21ee2700a05aded1a3427dcef6333 to your computer and use it in GitHub Desktop.

Select an option

Save hekystyle/97b21ee2700a05aded1a3427dcef6333 to your computer and use it in GitHub Desktop.
Recursively remove all bin and obj folder, usefull for .NET projects when there are weirdos errors while compiling.
Get-ChildItem -Path "./" -Directory -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.Name -ieq "bin" -or $_.Name -ieq "obj" } | Remove-Item -Recurse -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment