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

Copper Contributor

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: 

cmeyer1285_0-1648680327864.png

 

Then under the msi folder I have the following: 

cmeyer1285_1-1648680382636.png

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

cmeyer1285_2-1648680497558.png

 

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. 

0 Replies