From 9a2adc0d68defd2e7693d1ad5256e9bf634d40d9 Mon Sep 17 00:00:00 2001 From: eeckert Date: Wed, 27 Sep 2023 16:59:49 -0600 Subject: [PATCH] add trailing slash --- Get-ProjectFolders.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Get-ProjectFolders.ps1 b/Get-ProjectFolders.ps1 index 616d6b5..29639c6 100644 --- a/Get-ProjectFolders.ps1 +++ b/Get-ProjectFolders.ps1 @@ -189,13 +189,17 @@ CREATE TABLE "MigrationStatus" ( $MigrationStatus_import = Import-Excel -Path $PAth_To_Migration_Status -WorksheetName "MPE Migration Tracker" -StartRow 2 foreach ($status in $MigrationStatus_import) { $SQLSourcePath = $status.'Source Path'.replace("'", "`'") #SQL Formatting + if ($SQLSourcePath -notmatch '\\$') { + $SQLSourcePath += '\' + } $SQLDestPath = $status.'Destination Path'.replace("'", "`'") #SQL Formatting + if ($SQLDestPath -notmatch '\\$') { + $SQLDestPath += '\' + } $SQLMigrationID = $status.'Migration ID' $SQLMigrationName = $status.'Migration Name' $SQLMigrationStatus = $status.'Current State' - # TODO Add code to ensure there's a trailing slash on Source and Dest paths (consistency) - $Query = "Select * from MigrationStatus WHERE MigrationID = `'$SQLMigrationID`'" $Test = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query