Customer requested a task which could unzip and decrypt files from a ZIP archive. Not only does this project do that, but it also can encrypt and zip files. A 3rd party package, DotNetZip (package project url https://github.com/haf/DotNetZip.Semverd) was utilized, and the package was found through Visual Studio's package manager. Previous Zip task utilized .NET library's own ZIP utility, which doesn't support passwords.

Project and NuGet package contains two new tasks:

Task ZipFiles:

Input Parameters

  • SourceFilesFolder
    • Points the folder, from where the method looks for files to be zipped.
  • FileMask
    • Mask for detecting files to be zipped.
  • ZipName
    • File name for the Zip archive.
  • Password
    • Password with which the task encrypts the files.

Output Result

  • ZipName
    • File name for the Zip archive.

Example usage

  • Source files folder: @"C:\zip\in"
  • File mask: "*.xml"
  • Zip name: @"C:\zip\out\test.zip"
  • Password: "SalaKala3"

Task UnzipFiles:

Input Parameters:

  • ZipFilePath
    • File system path pointing the source archive file.
  • ZipTargetFolder
    • Target folder for the archive's extracted contents.
  • Password
    • Password with which the task encrypts the files.

Output Result:

  • ZipTargetFolder
    • Target folder for the archive's extracted contents.

Example usage

  • Zip file path: @"C:\zip\in\test.zip"
  • Zip target folder: @"C:\zip\out"
  • Password: "SalaKala3"