Last active
July 11, 2023 10:21
-
-
Save mika76/eab91dc0a569a87a5e8ad763dc938840 to your computer and use it in GitHub Desktop.
C:\Users\name\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all bin and obj folders recursively | |
function del-obj-bin { | |
Param ([string]$Path = ".\") | |
$title = 'Delete all nested obj and bin folders' | |
$question = 'Are you sure you want to proceed?' | |
$choices = '&Yes', '&No' | |
$decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) | |
if ($decision -eq 0) { | |
Get-ChildItem $Path -include bin,obj -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