Skip to content

Instantly share code, notes, and snippets.

@sayedihashimi
Last active August 29, 2015 14:16
Show Gist options
  • Save sayedihashimi/708f725a754ce42978c8 to your computer and use it in GitHub Desktop.
Save sayedihashimi/708f725a754ce42978c8 to your computer and use it in GitHub Desktop.
PowerShell one liner which can be used to delete some temp files which are added to Visual Studio projects.
# PowerShell one liner which can be used to delete some temp files which are added to Visual Studio projects.
# ***Use at your own risk***
get-childitem "$env:userprofile\Documents" 'Visual Studio*' -Directory | % { Get-ChildItem $_.Fullname -Include bin,obj,packages,node_modules,artifacts -Directory -Recurse }|Select-Object -Property Fullname | % { if(Test-Path $_.FullName){Remove-Item $_.FullName -Recurse -Force -ErrorAction Continue }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment