Introduction
In this blog post, we will see how to compress and encrypt files with a password (zip and AES). We will use the SSIS Zip File Task, which comes with many advanced options, including an encryption feature for password-protected zip files.
NOTE: The Password feature is only available for the Zip file format. If you choose the GZip (*.gz) format, then the encryption feature is not available.
Zip multiple files using the SSIS Compression task.
The SSIS Zip File Task can either create a zip file for each source file in the list (e.g., *.txt) or create one zip file for all files from the source.
Here is the screenshot of how to zip multiple files
Password-protect Zip file (AES encryption – AES128, AES256)
To protect a zip file with a password, specify the Password on the security tab and select the Encryption Algorithm. See below screenshot

Password-protect a Zip file using SSIS (Encrypt using AES256 algorithm, Hide file names from compressed archive)
Unzip password password-protected file
To unzip a password-protected file, you can use the same settings on the Security Tab, except change your source, target, and action.
Hide file list from encrypted Zip file (Double Zip Technique)
When you password-protect a Zip file, one common issue you may face is that it will allow anyone to see file names inside the archive (i.e., Zip file). Even though the file’s content is encrypted, you may still want to hide files stored in your archive. If you need to hide file names from the archive, then use the technique below. Basically, you have to double-zip/encrypt. See the above screenshot.
Conclusion
Zip/Unzip is the most common need while exchanging data. Securing files can be even more critical. If you are an SSIS developer, you can use the SSIS Zip File Task with ease. The zip file task is part of the SSIS PowerPack. Try for free and explore many features that can save your time and give you peace of mind.


