From 8cbfd3df5fbf3f0373b0da6d926d45667a31fd03 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Thu, 18 Aug 2022 18:31:51 -0400 Subject: [PATCH] reorder default search paths --- Remove-OldRevitLocals.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Remove-OldRevitLocals.ps1 b/Remove-OldRevitLocals.ps1 index 225d8a7..72bcbb4 100644 --- a/Remove-OldRevitLocals.ps1 +++ b/Remove-OldRevitLocals.ps1 @@ -4,8 +4,8 @@ $FileAllowedAge = (Get-Date).AddMonths(-1) # Build all Revit local paths $RevitLocalPaths = @() ForEach ( $userProfile in (Get-ChildItem -Path "${Env:SystemDrive}\Users" | Where-Object { $_.PSIsContainer }) ) { - If ( Test-Path "${userProfile}\Documents" ) { $RevitLocalPaths.Add("${userProfile}\Documents") } If ( Test-Path "${userProfile}\Documents\Revit Locals" ) { $RevitLocalPaths.Add("${userProfile}\Documents\Revit Locals") } + If ( Test-Path "${userProfile}\Documents" ) { $RevitLocalPaths.Add("${userProfile}\Documents") } } ForEach ( $path in $RevitLocalPaths ) {