Skip to content

Instantly share code, notes, and snippets.

@Clijsters
Last active January 6, 2023 13:02
Show Gist options
  • Save Clijsters/d067eec4e4affc23352f7bbc96110e90 to your computer and use it in GitHub Desktop.
Save Clijsters/d067eec4e4affc23352f7bbc96110e90 to your computer and use it in GitHub Desktop.
Everybody hates cvs
# "De-CVS's" a folder structure
$cd = (Get-Item -Path ".\" -Verbose).FullName
Write-Host "Are you sure you want to recursively delete all ""CVS""-Folders in ""$cd""?"
if ((Read-Host) -cin {"y", "yes"}) {
Write-Host "Deleting..."
Get-ChildItem -Force -Recurse | Where-Object { $_.Name -eq "CVS" } | ForEach-Object {
Write-Host $_.FullName;
Remove-Item $_.FullName -Recurse -Force
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment