-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete-bin-obj.ps1
More file actions
22 lines (19 loc) · 847 Bytes
/
delete-bin-obj.ps1
File metadata and controls
22 lines (19 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Clear-Host
Write-Host "Deleting all BIN and OBJ folders..." -ForegroundColor Cyan
Get-ChildItem -Path . -Include bin,obj -Recurse -Directory | ForEach-Object {
if ($_.FullName -notmatch "\\node_modules\\") {
Write-Host "Deleting:" $_.FullName -ForegroundColor Yellow
Remove-Item $_.FullName -Recurse -Force
} else {
Write-Host "Skipping:" $_.FullName -ForegroundColor Magenta
}
}
Get-ChildItem -Path . -Include ".vs" -Recurse -Directory -Hidden | ForEach-Object {
if ($_.FullName -notmatch "\\node_modules\\") {
Write-Host "Deleting:" $_.FullName -ForegroundColor Yellow
Remove-Item $_.FullName -Recurse -Force
} else {
Write-Host "Skipping:" $_.FullName -ForegroundColor Magenta
}
}
Write-Host "BIN and OBJ folders have been successfully deleted." -ForegroundColor Green