nascleanup + autoThumbs: flatten indexer layout, SMB rm, recursive tmp
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $Root
|
||||
)
|
||||
if (-not (Test-Path -LiteralPath $Root)) { exit 0 }
|
||||
$dirs = @(Get-ChildItem -LiteralPath $Root -Recurse -Directory -Filter 'eaDir_tmp' -ErrorAction SilentlyContinue |
|
||||
Sort-Object { $_.FullName.Length } -Descending)
|
||||
foreach ($d in $dirs) {
|
||||
try {
|
||||
Remove-Item -LiteralPath $d.FullName -Recurse -Force
|
||||
Write-Host "Removed: $($d.FullName)"
|
||||
} catch {
|
||||
Write-Host "Failed: $($d.FullName)"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user