update DaysWithoutModification to DaysWithNoModification
This commit is contained in:
@@ -19,7 +19,7 @@ Write-Output '------------------------------------------------------------------
|
||||
Write-Output "Started at : ${StartTime}"
|
||||
Write-Output "Run on : ${Env:COMPUTERNAME}"
|
||||
Write-Output "Source : ${CleanupPath}"
|
||||
If ( $DaysWithoutModification -gt 0 ) { Write-Output "Modified : ${DaysWithoutModification} day(s) ago" }
|
||||
If ( $DaysWithNoModification -gt 0 ) { Write-Output "Modified : ${DaysWithNoModification} day(s) ago" }
|
||||
Write-Output '-------------------------------------------------------------------------------'
|
||||
|
||||
# Identify all files and folders that match the criteria for what we're looking for
|
||||
@@ -32,7 +32,7 @@ $TEMPORARY_REVIT_OBJECTS = Get-ChildItem -Path $CleanupPath -Recurse | Where-Obj
|
||||
$_.Name -match '\.\d\d\d\d\.rvt$'
|
||||
|
||||
# Files and folders not recently modified
|
||||
) -and ($_.LastWriteTime -lt $StartDate.AddDays(-$DaysWithoutModification))
|
||||
) -and ($_.LastWriteTime -lt $StartDate.AddDays(-$DaysWithNoModification))
|
||||
}
|
||||
|
||||
# Loop thru each path to get its size and
|
||||
|
||||
Reference in New Issue
Block a user