Skip to content

Instantly share code, notes, and snippets.

@Douile
Created June 3, 2019 20:01
Show Gist options
  • Save Douile/3fdf43c1e4e563b53390f20b43340f2b to your computer and use it in GitHub Desktop.
Save Douile/3fdf43c1e4e563b53390f20b43340f2b to your computer and use it in GitHub Desktop.
Delete latent community server maps
$prefixes = @("surf_","bhop_","am_")
$csgodir = 'C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\maps'
foreach($prefix in $prefixes) {
Write-Output "Deleting $prefix maps..."
Get-ChildItem $csgodir -Filter ([regex]::escape($prefix) + "*") -File | Remove-Item
}
Write-Output "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment