How to create a password protected zip file

How to create a password protected zip file?
I am able to create a zip file using invoke method as mentioned in Compress files to .zip format. If I could add a password to this zip file or if anyone is aware of the solution to create password protected zip files without using Winzip front end UI menthod would be helpful.

1 Like

Would be glad to know if such method exists;

Using a third-party zip tool- 7-zip(*free) which supports AES-256 also does the work!

I am looking forward to a solution based on WinZip due to security reasons.

1 Like

System.IO.Compression does not support passwords (since it’s purpose is not security, but just compression), so I don’t think that will work.
All solutions I’ve encountered require some sort of a 3rd party library.

3 Likes

Thanks for the update.

Hi @igul,
Can you try this ?

Regards
Balamurugan

1 Like

Hi @igul

You achieve using invoke PowerShell do find the below sample
:slight_smile:
zip_a_file_with_password_protected.zip (2.4 KB)

Thanks & regards
Sanjay Shankhla

3 Likes

Hi Sanjay,

In the above code we manually need to pass the path but how to add the path dynamically, each time i will have different folders to zip. I would be passing it through variable. how to pass the variable value in ps script.

Regards,
Praveena

Hi Bala,

Password field in the zip activity is not working properly… Even after providing password it is still zipping the file without password protection.

Regards,
Praveena

hi @praveenasrinath,

check this out for you reference

1 Like

Hi @PraveenaSrinath

Thank you for the feedback. A lot of users are using this activity with no problem. Can you explain your situations please. and also I will check and let you know.

Thank you
Balamurugan.S

Hi Bala,

It is really easy to zip the file but you have provided password property to zip the file. If I pass password it is not zipping the file with password. So can you help me out with this.

Regards,
Praveena

Hi @PraveenaSrinath,

I have tested. Here every thing is working fine. But any way can you try this one !

image

Regards
Balamurugan.S

1 Like

Same problem as Praveena. Zip activities do not set password for the zipped files.