I am using the following script to create URLs.
$files1 =Get-ChildItem $ENV:WORKSPACE/Pro_result
$prefix="https://test-jenkins-a-master-black.aws.jhgf.com/job/qa/job/TestDemo_email_PDF/ws/Pro_result/"
foreach ($file in $files1) {
write-Output ($prefix+$file.Name)
}
However, I am getting a url like this and I have no control over the filename https://test-jenkins-a-master-black.aws.jhgf.com/job/qa/job/TestDemo_email_PDF/ws/Pro_result/W0A-209-193-210_Dealer portal production smoke test_20220427-120342.pdf
It breaks after portal. How do I fix this?