From fba91d38b340627db950204315242417c0e27a3e Mon Sep 17 00:00:00 2001 From: eeckert Date: Fri, 15 Sep 2023 13:12:12 -0600 Subject: [PATCH] anotherl ogic update...do u evn test? --- Get-ProjectFolders.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Get-ProjectFolders.ps1 b/Get-ProjectFolders.ps1 index 801871f..47f8f12 100644 --- a/Get-ProjectFolders.ps1 +++ b/Get-ProjectFolders.ps1 @@ -101,9 +101,10 @@ $OfficeList | ForEach-Object -parallel { } elseif ($result.Length -ge 5) { $Server = $_.FullName.Substring(1, 4) -replace (':|\\', '') + $Path = $_.FullName $projectnumber = $result.tostring() $DBConnect = New-SqliteConnection -DataSource $PathToDB_Copy - $Query = "Select Project FROM FolderData where Project = '$ProjectNumber' AND Server = '$Server';" + $Query = "Select Project FROM FolderData where Project = '$ProjectNumber' AND Server = '$Server' AND Path = '$Path';" $sql_result = Invoke-SqliteQuery -DataSource $PathToDB_Copy -Query $Query if (($sql_result.project -eq $null)) { @@ -124,7 +125,7 @@ $OfficeList | ForEach-Object -parallel { $folder_LastWrite = ($FolderPath_Data | measure LastWriteTime -Maximum).Maximum $folder_LastAccess = ($FolderPath_Data | measure LastAccessTime -Maximum).Maximum - if ($folder_FileSize -le 0 -or $folder_FileCount -eq $null) { + if ($folder_FileSize -le 0 -or $folder_FileCount -eq 0) { #Let's ignore Null Values }