diff --git a/SharePointFunctions.ps1 b/SharePointFunctions.ps1 index 5b2f8b0..9a01f37 100644 --- a/SharePointFunctions.ps1 +++ b/SharePointFunctions.ps1 @@ -8,7 +8,7 @@ function Load-Config { $script:config = Get-Content $configPath -Raw | ConvertFrom-Json return $true } else { - $script:txtStatus.Text += "Error loading configuration: $($_.Exception.Message)`n" + $script:txtStatus.Text += "Error loading configuration: Config file not found`n" return $false } } @@ -477,7 +477,7 @@ function Convert-Files { try { # Get the Drive ID and destination folder $destinationFolder = $script:txtTempLib.Text - $uploadUri = "https://graph.microsoft.com/v1.0/drives/$driveId/root:/$destinationFolder/$xlsxFileName:/content" + $uploadUri = "https://graph.microsoft.com/v1.0/drives/$driveId/root:/$($destinationFolder)/$($xlsxFileName):/content" # Read the file content $fileContent = [System.IO.File]::ReadAllBytes($xlsxPath)