fix array building
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
|
||||
# Set the maximum allowed age of Revit local files
|
||||
$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\Revit Locals" ) { LogMsg "Adding search path: ""${userProfile}""" ; $RevitLocalPaths.Add("${userProfile}\Documents\Revit Locals") }
|
||||
If ( Test-Path "${userProfile}\Documents" ) { LogMsg "Adding search path: ""${userProfile}""" ; $RevitLocalPaths.Add("${userProfile}\Documents") }
|
||||
$profilePath = $userProfile.FullName
|
||||
If ( Test-Path "${profilePath}\Documents\Revit Locals" ) { $RevitLocalPaths += ,@("${profilePath}\Documents\Revit Locals") }
|
||||
If ( Test-Path "${profilePath}\Documents" ) { $RevitLocalPaths += ,@("${profilePath}\Documents") }
|
||||
}
|
||||
|
||||
ForEach ( $path in $RevitLocalPaths ) {
|
||||
|
||||
Reference in New Issue
Block a user