Zipping Files Through JAMS


There are a few ways to zip files through JAMS. A Workflow Job has an activity called ZipFiles which can be used to zip files. You can also use PowerShell, but for this approach you will need to have PowerShell version 3 as well as .Net 4.5 on the machine where the Job will run. Below is a PowerShell example:


$path = "D:\Temporary\"
$zipFileName = "D:\Temporary\"

# Load the assembly to use for Zipping files

# Get the Optimal CompressionLevel enum
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal

# Perform the Zip operation
[System.IO.Compression.ZipFile]::CreateFromDirectory($path,$zipFileName, $compressionLevel, $false)

Have more questions? Submit a request