remove alias in favor of cmdlet name
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
If ( $OlderThanDays -is [int] ) {
|
||||
If ( Test-Path $Path ) {
|
||||
Write-Output "Deleting all items older than ${OlderThanDays} days in ""${Path}"""
|
||||
$files = Get-ChildItem $Path | Where { !$_.PSIsContainer -and $_.LastWriteTime -lt (Get-Date).AddDays(-${OlderThanDays}) }
|
||||
$files = Get-ChildItem $Path | Where-Object { !$_.PSIsContainer -and $_.LastWriteTime -lt (Get-Date).AddDays(-${OlderThanDays}) }
|
||||
Foreach ( $f in $files ) {
|
||||
$msg = "Deleting {0}" -f $f.FullName ; Write-Output $msg
|
||||
Try { Remove-Item $f -Force | Out-Null }
|
||||
|
||||
Reference in New Issue
Block a user