diff --git a/Get-ProjectFolders.ps1 b/Get-ProjectFolders.ps1 index 83d6207..4ba6da5 100644 --- a/Get-ProjectFolders.ps1 +++ b/Get-ProjectFolders.ps1 @@ -105,7 +105,7 @@ $OfficeList | ForEach-Object -parallel { $Path = $_.FullName.Replace("'", "`'") #SQL Formatted Path $projectnumber = $result.tostring() $DBConnect = New-SqliteConnection -DataSource $PathToDB_Copy - $Query = "Select Project FROM FolderData where Project = '$ProjectNumber' AND Server = '$Server' AND Path = '$Path';" + $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)) {