diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index d2800ff..b86afd4 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -5080,15 +5080,15 @@ Function New-DeploymentUSB { # Copy other files if ($using:CopyFFU.IsPresent -and $null -ne $using:SelectedFFUFile) { - if ($using:SelectedFFUFile -is [array]) { + $selectedFFUFiles = @($using:SelectedFFUFile) + if ($selectedFFUFiles.Count -gt 1) { WriteLog "Copying multiple FFU files to $DeployPartitionDriveLetter" - foreach ($FFUFile in $using:SelectedFFUFile) { - robocopy (Split-Path $FFUFile -Parent) $DeployPartitionDriveLetter (Split-Path $FFUFile -Leaf) /J /NFL /NDL /NJH /NJS /nc /ns /np | Out-Null - } } - else { - WriteLog "Copying $($using:SelectedFFUFile) to $DeployPartitionDriveLetter" - robocopy (Split-Path $using:SelectedFFUFile -Parent) $DeployPartitionDriveLetter (Split-Path $using:SelectedFFUFile -Leaf) /J /NFL /NDL /NJH /NJS /nc /ns /np | Out-Null + elseif ($selectedFFUFiles.Count -eq 1) { + WriteLog "Copying $(Split-Path $selectedFFUFiles[0] -Leaf) to $DeployPartitionDriveLetter" + } + foreach ($ffuFile in $selectedFFUFiles) { + robocopy (Split-Path $ffuFile -Parent) $DeployPartitionDriveLetter (Split-Path $ffuFile -Leaf) /J /NFL /NDL /NJH /NJS /nc /ns /np | Out-Null } }