# Zip files/folders with password from jenkins pipeline or running shell script command

**URL:** <https://community.jenkins.io/t/zip-files-folders-with-password-from-jenkins-pipeline-or-running-shell-script-command/4343>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [October 28, 2022, 10:50am UTC](https://community.jenkins.io/t/zip-files-folders-with-password-from-jenkins-pipeline-or-running-shell-script-command/4343 "2022-10-28T10:50:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayur](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Mayur](https://community.jenkins.io/u/Mayur)\
**Post date:** [October 28, 2022, 10:50am UTC](https://community.jenkins.io/t/zip-files-folders-with-password-from-jenkins-pipeline-or-running-shell-script-command/4343/1 "2022-10-28T10:50:25Z")

</div>

We are trying to zip folder with password. Getting zip error as below  
“zip error: Invalid command arguments (stderr is not a tty)”  
We checked other plugins like “Files Operation”, which don’t have zip with password option.

Tried both options through pipeline job and through shell script.  
sample script as below  
zip -er test.zip test

Running Jenking on Mac OS, details are below,  
Mac OS - 11.7  
Jenkins version - 2.361.2

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [October 28, 2022, 3:37pm UTC](https://community.jenkins.io/t/zip-files-folders-with-password-from-jenkins-pipeline-or-running-shell-script-command/4343/2 "2022-10-28T15:37:00Z")

</div>

I usually just silently move things around into the right category, but I’m very curious why you chose community events for your question about jenkins?

When I was googling, providing a password as an argument is apparently not supported in all versions of the cli. Maybe try installing a different zip cli, or maybe the 7z tool which is a lot better supported.
