# How to zip folder

**URL:** <https://discourse.nodered.org/t/how-to-zip-folder/37101>\
**Category:** General\
**Created:** [7 December 2020 07:03 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101 "2020-12-07T07:03:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [7 December 2020 07:03 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/1 "2020-12-07T07:03:20Z")

</div>

Hi,

I have compressed a file into a zip file using the `zip` node,  
but to compress a folder into a zip file, I don't know what to do !?

Any hint will be great.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 December 2020 07:43 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/2 "2020-12-07T07:43:07Z")

</div>

You could possibly use an exec node. Make sure you pass the full path to the folder.

---

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [7 December 2020 07:48 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/3 "2020-12-07T07:48:22Z")

</div>

Can you please specify for me what the parameters of exec node are !?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 December 2020 08:22 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/4 "2020-12-07T08:22:27Z")

</div>

I don't understand what you mean. Just put the zip command that you would use from the command line into the exec node and, unless you are feeding part or all of the command in via the payload, clear the Append Payload checkbox.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 December 2020 08:47 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/5 "2020-12-07T08:47:03Z")

</div>

Closing this thread as @minhhn0205 has started a new thread here: [How to zip multiple files](https://discourse.nodered.org/t/how-to-zip-multiple-files/37105)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 December 2020 08:47 UTC](https://discourse.nodered.org/t/how-to-zip-folder/37101/6 "2020-12-07T08:47:07Z")

</div>


