Skip to content

Instantly share code, notes, and snippets.

@elinx
Last active August 29, 2015 14:23
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 elinx/4b707836df134e8081bf to your computer and use it in GitHub Desktop.
Save elinx/4b707836df134e8081bf to your computer and use it in GitHub Desktop.
Remove sub-folders(with or without content) in a specific directory using PowerShell(windows)
get-childitem -r -path D:\vsprojects -filter *Debug* | remove-item -force -recurse
# this will remove all debug folders of the visual studio projects
# ref1: http://ss64.com/ps/remove-item.html
# ref2: http://serverfault.com/questions/271548/delete-a-sub-folder-with-specific-name-from-all-sub-folders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment