<p>In the copy files task, there is an optional parameter flattenFiles (bool). This does the job.</p>

CC BY-SA 4.0
2021-04-20T10:46:32.960Z
2021-04-20T10:46:32.960Z
JohnFF
<p>I've been using Azure Pipelines and Releases to build and publish artifacts.</p>
<p>In SolutionX, there are projects ProjectY and ProjectYTests.</p>
<p>I build everything in the solution (to run the tests) and then I want to publish just ProjectY's built contents, in an artifact called drop.</p>
<p>I deploy it to a folder called FolderZ.</p>
<p>When I download the published artifact, the filepath is like: <code>FolderZ/drop/ProjectY/bin/Release/*</code>.
I'd much rather it was just <code>FolderZ/*</code>.</p>
<p>How can I get rid of (at least) the bin/Release pipeline bit?</p>

<azure><cicd>
How to only include directory contents in Azure Publish Artifact without full filepath?
JohnFF
# How to only include directory contents in Azure Publish Artifact without full filepath?

(Asked by: username_0 on 2021-04-19)

I've been using Azure Pipelines and Releases to build and publish artifacts.

In SolutionX, there are projects ProjectY and ProjectYTests.

I build everything in the solution (to run the tests) and then I want to publish just ProjectY's built contents, in an artifact called drop.

I deploy it to a folder called FolderZ.

When I download the published artifact, the filepath is like: `FolderZ/drop/ProjectY/bin/Release/*`.
I'd much rather it was just `FolderZ/*`.

How can I get rid of (at least) the bin/Release pipeline bit?

**Tags:** azure, cicd


---

## 1 answers

### Answer by username_0 on 2021-04-20. Score: 2

In the copy files task, there is an optional parameter flattenFiles (bool). This does the job.


---

