Forum Discussion

user456902's avatar
user456902
Copper Contributor
Mar 30, 2022

How to get Azure DevOps Download Pipeline Artifact to just download a file within a folder

Hello, so I am trying to run an Azure DevOps task that will download a file from a folder from a Build pipeline Artifact. 

This is what the artifact produced looks like: 

 

Then under the msi folder I have the following: 

In my DownloadPipelineArtifact task, I want to just download the [file-name]-3.16.1.msi file not both. 
I have an itemPattern that will download the files, but it includes the `msi` folder in the download path

 

How can I get it so that ONLY THE FILE is downloaded. 

I have tried various `itemPath` combinations in my yaml syntax. This is my most current attempt, and it still fails 😞 

artifactName: '[artifact-name]'
itemPattern:  |
  **
  !**/*.exe
  !msi/**
  [file-name] - 3.16.1.msi

 

Any help is appreciated. 

No RepliesBe the first to reply

Resources