diff --git a/Cleanup-RevitTempFilesOnFileServerCalcOnly.ps1 b/Cleanup-RevitTempFilesOnFileServerCalcOnly.ps1 index 2c88f13..85f7696 100644 --- a/Cleanup-RevitTempFilesOnFileServerCalcOnly.ps1 +++ b/Cleanup-RevitTempFilesOnFileServerCalcOnly.ps1 @@ -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