Created
March 16, 2026 12:42
-
-
Save kickbase/9df724ddab0d93f436eafebfbace82bb to your computer and use it in GitHub Desktop.
[ PowerShell ] [ Houdini ] Recursively delete backup folders. If no argument is provided, the current directory will be targeted.
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
| function rm_bu { | |
| param( | |
| [string]$Path = "." | |
| ) | |
| Get-ChildItem -Path $Path -Recurse -Directory -Filter "backup" | | |
| Remove-Item -Recurse -Force | |
| Write-Host "[$(Resolve-Path $Path)] 以下の backup フォルダを削除しました。" -ForegroundColor Green | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save to the following path, then run
. $PROFILEafter making changes.C:\Users\<user name>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1