diff --git a/Remove-OldRevitLocals.ps1 b/Remove-OldRevitLocals.ps1 index 72bcbb4..0afb82c 100644 --- a/Remove-OldRevitLocals.ps1 +++ b/Remove-OldRevitLocals.ps1 @@ -17,6 +17,7 @@ ForEach ( $path in $RevitLocalPaths ) { $baseName = $revitfile.BaseName $BackupDir = "${parentDir}\${basename}_backup" + # Only remove Revit local files that have worksharing enabled If ( (Test-Path "${revitfile}") -and (Test-Path "${BackupDir}")) { LogMsg "Deleting ""${revitfile}"" and backup directory ""${BackupDir}""" Remove-Item "${revitfile}" -Force -ErrorAction SilentlyContinue