Skip to content

Instantly share code, notes, and snippets.

@aaronhoffman
Last active November 4, 2018 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronhoffman/17e2d902bbcdcb8b65c58cac2124f8ad to your computer and use it in GitHub Desktop.
Save aaronhoffman/17e2d902bbcdcb8b65c58cac2124f8ad to your computer and use it in GitHub Desktop.
Clean up source code directory. Delete all bin, obj, node_modules, bower_components, and packages directories.
# delete all bin,obj,node_modules,bower_components,packages,.vs, and *proj.user files and directories
Get-ChildItem . -include bin -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include node_modules -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include bower_components -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include packages -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include .vs -Hidden -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Get-ChildItem . -include *proj.user -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment