diff --git a/Copy-Revit2Egnyte.ps1 b/Copy-Revit2Egnyte.ps1 index 531e927..a935d0d 100644 --- a/Copy-Revit2Egnyte.ps1 +++ b/Copy-Revit2Egnyte.ps1 @@ -77,6 +77,11 @@ foreach ($folder in $Local_Folder_List) { else { $FolderName = $folder.Name $path_to_pathtxt = $folder.FullName + "\path.txt" + if ((get-content $path_to_pathtxt) -eq "IgnoreMe") { + # allows us to set folders to ignored by changing Path.txt to contain IgnoreMe + # Break leaves the loop and goes to the next iteration + break + } $PAthTXT_Exists = Test-Path $path_to_pathtxt @@ -100,10 +105,7 @@ foreach ($folder in $Local_Folder_List) { $ErrorMessage += '`"' + $FolderName + "`": Path.txt must specify only one path.
" } - if ($Egnyte_Path -eq "IgnoreMe") { - # allows us to set folders to ignored by changing Path.txt to contain IgnoreMe - $Egnyte_Path_Valid = $false - } + else { $Egnyte_Path_Valid = $true }