# 7Zip action

**URL:** <https://www.finalbuilder.com/forums/t/7zip-action/5036>\
**Category:** Discussion\
**Created:** [August 11, 2013, 10:55am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036 "2013-08-11T10:55:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)\
**Post date:** [August 11, 2013, 10:55am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036/1 "2013-08-11T10:55:02Z")

</div>

No matter what i do, i am not able to create an archive having the file only at root level. Always the relative path is added, even if i use the absolut path in the files area (as on the command line).

I also tried copying all files to a directory an archive that one.

I simply want to create an archive containing some files (without paths). HELP!

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [August 12, 2013, 6:40am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036/2 "2013-08-12T06:40:55Z")

</div>

Hi Christian,

7-Zip stores paths relative to the working directory (or, in Continua, the Root Directory). So after copying all the files to a single folder, set the Root Directory to that folder.&nbsp;

e.g.&nbsp;

RootDirectory = $Workspace$\Source\Care4\Code\FilesToArchive

File Names / Patterns =

&nbsp;Liesmich.\*  
\*.pdf  
\*.msi

---

<div class="post-metadata">

**Author:** ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)\
**Post date:** [August 12, 2013, 7:39am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036/3 "2013-08-12T07:39:48Z")

</div>

Ok, it seems my 7zip action is correct but when copying files (so the copy action is the evil one ) the paths are preserved. The is kind of unnatural behavior i think. So i need to have a Copy Files action for each source directory to have a flat list of files in the end.

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [August 12, 2013, 8:04am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036/4 "2013-08-12T08:04:29Z")

</div>

We'll look into adding an option to the Copy action (and Move action) to allow you specify whether the directory structure should be preserved or not.

---

<div class="post-metadata">

**Author:** ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)\
**Post date:** [August 12, 2013, 8:06am UTC](https://www.finalbuilder.com/forums/t/7zip-action/5036/5 "2013-08-12T08:06:00Z")

</div>

Thank you very much.
