Compress / ZIP files


I want to zip a set of files in a folder, however not all the files. I have the list of files captured in both a String Array and a Datatable. Does anyone know if its possible to utilise either of these data sources to indicate which files are to be included in the ZIP file.



You can custom-create a folder for the purpose of zipping and you can iterate through the array that you have. In the loop, move each file to the above-specified folder & compress the folder altogether. Thus you have a compressed folder with the specified files now.


Hope this helps,
Best Regards.


  1. Create a folder
  2. Use the ‘For each file in folder’ activity
  3. Use the If condition (Array.contains(“FileName”))
  4. If the condition satisfies then copy the current file to the above created folder.
  5. After storing of required files in the above created folder then use the ‘Compress/Zip file’ activity.
    (After Foreach Loop)


Couldn’t find it documented anywhere, but this seems to work:

Here “files” is an IEnumerable (array, list, …) of file paths.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.