update DaysWithoutModification to DaysWithNoModification

This commit is contained in:
2025-01-02 17:00:29 -05:00
parent 39ae5a4235
commit fdc0e536cc
@@ -19,7 +19,7 @@ Write-Output '------------------------------------------------------------------
Write-Output "Started at : ${StartTime}" Write-Output "Started at : ${StartTime}"
Write-Output "Run on : ${Env:COMPUTERNAME}" Write-Output "Run on : ${Env:COMPUTERNAME}"
Write-Output "Source : ${CleanupPath}" 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 '-------------------------------------------------------------------------------' Write-Output '-------------------------------------------------------------------------------'
# Identify all files and folders that match the criteria for what we're looking for # 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$' $_.Name -match '\.\d\d\d\d\.rvt$'
# Files and folders not recently modified # 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 # Loop thru each path to get its size and