#region wait for 10 then Delete Old Files # wait for 10 for ($i = 10; $i -gt 0; $i--) { Write-Host("Deleting old files in $i seconds") Start-Sleep -Seconds 1 } # delete old files foreach ($item in $items) { Remove-Item -Path $item.CurrentLocation -Force } #endregion