tag:help.appveyor.com,2012-11-13:/discussions/questions/20479-can-i-strip-the-leading-subfolders-off-an-archive-path-when-its-publishedAppVeyor: Discussion 2018-10-19T08:18:46Ztag:help.appveyor.com,2012-11-13:Comment/452832632018-05-15T05:05:59Z2018-05-15T05:05:59ZCan I strip the leading subfolders off an archive path when it's published?<div><p>(Originally a side-question from <a href="https://help.appveyor.com/discussions/problems/14165-problems-fetching-artifact-from-another-build">here</a>)</p>
<p>A build I've gotten working recently publishes an artifact from a directory further into the project, like this:</p>
<pre>
<code>artifacts:
- path: lib_vrinputemulator\%CONFIGURATION%\LibVRInputEmulator.zip
name: LibVRInputEmulator</code>
</pre>
<p>This results in awkward archive URLs, but it also means that if the directory ever got renamed or relocated, other builds relying on this path would then fail.</p>
<p>Is there a way to strip off the "lib_vrinputemulator\Release\" for the actual published result?</p></div>trejkaztag:help.appveyor.com,2012-11-13:Comment/452832632018-05-16T04:29:31Z2018-05-16T04:29:31ZCan I strip the leading subfolders off an archive path when it's published?<div><p>You can copy <code>LibVRInputEmulator.zip</code> to the build folder (<code>APPVEYOR_BUILD_FOLDER</code> <a href="https://www.appveyor.com/docs/environment-variables/">environment variable</a>) as part of <code>build_script</code>or <code>after_build</code> script and the set <code>- path: LibVRInputEmulator.zip</code> in artifacts settings.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/452832632018-05-16T04:31:28Z2018-05-16T04:31:28ZCan I strip the leading subfolders off an archive path when it's published?<div><p>I figured that was the case too, but it does mean copying extra files.</p>
<p>At the moment I'm dodging it by changing the path the zip is created in to put it directly in the root, but it still seems like a build should be able to put its artifact anywhere it wants, and then it should be possible to pick them up from anywhere with any path.</p></div>trejkaz