Skip to content

Instantly share code, notes, and snippets.

@kickbase
Created March 16, 2026 12:42
Show Gist options
  • Select an option

  • Save kickbase/9df724ddab0d93f436eafebfbace82bb to your computer and use it in GitHub Desktop.

Select an option

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.
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
}
@kickbase
Copy link
Copy Markdown
Author

Save to the following path, then run . $PROFILE after making changes.

C:\Users\<user name>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment