tag:help.appveyor.com,2012-11-13:/discussions/questions/11934-artifact-packaging-ignoring-empty-foldersAppVeyor: Discussion 2018-08-25T02:20:59Ztag:help.appveyor.com,2012-11-13:Comment/438736472017-10-26T18:39:44Z2017-10-26T18:39:44ZArtifact packaging ignoring empty folders<div><p>Hi Steven,</p>
<p>This is default zip behavior, we did not introduce this intentionally. Anyway you can zip your folder manually with special <code>7z</code> switches and then package your own <code>.zip</code> file as an artifact. This YAML worked for me:</p>
<pre>
<code>install:
- mkdir contains-empty-folders\folder1
- mkdir contains-empty-folders\folder2
build_script:
- cmd: 7z a -r -tzip contains-empty-folders.zip contains-empty-folders
artifacts:
- path: contains-empty-folders.zip</code>
</pre></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/438736472017-10-27T08:11:33Z2017-10-27T08:11:33ZArtifact packaging ignoring empty folders<div><p>Thank you for the response Ilya.<br>
I wasn't sure, hence the question.<br>
I've been using 7zip on my desktop/laptop for a few years and had not noticed this, hence the confusion.<br>
I will use the cmd to create the zip.</p></div>Steventag:help.appveyor.com,2012-11-13:Comment/438736472017-10-30T12:57:10Z2017-10-30T12:57:11ZArtifact packaging ignoring empty folders<div><p>Hi Ilya, that did not work for me unfortunately... Any ideas?</p></div>Steventag:help.appveyor.com,2012-11-13:Comment/438736472017-10-30T13:44:33Z2017-10-30T13:44:34ZArtifact packaging ignoring empty folders<div><p>I managed to figure it out:</p>
<p>I needed to add * to the path for the 7zip command</p></div>Steventag:help.appveyor.com,2012-11-13:Comment/438736472017-10-30T17:34:49Z2017-10-30T17:34:49ZArtifact packaging ignoring empty folders<div><p>Thank you for update. However I am a little bit surprised that you were needed to update path. AppVeyor build worker images have path set to <code>7z</code> (not <code>7zip</code>) command by default. I would recommend to ensure that you do not have commands which overwrite <code>path</code> variable (instead of updating it).</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/438736472017-10-31T08:37:00Z2017-10-31T08:37:01ZArtifact packaging ignoring empty folders<div><p>Hi Ilya, I meant the path to the folder to zip up,<br>
i.e. in the case of your example it would look like this:</p>
<p>7z a -r -tzip contains-empty-folders.zip contains-empty-folders*</p></div>Steventag:help.appveyor.com,2012-11-13:Comment/438736472017-10-31T20:25:52Z2017-10-31T20:25:52ZArtifact packaging ignoring empty folders<div><p>I see, thanks for clarification.</p></div>Ilya Finkelshteyn