Basically, I want to zip select files present in a given directory using this activity.
I understand there are workarounds like using Invoke code or by transferring those files to another temporary folder and zipping that - I just want to know if its possible to utilize this field to get the job done.
Hi @ashwin.ashok , why not use the ‘Content to Zip’ parameter on the activity? you can provide the path to the file(s) you want to zip using that field.
The ‘Resources to Zip’ takes an IEnumerable parameter. If you have IResources you want to compress/zip, then you could use that field.
Appreciate your response.
I would have used that if it let me add files dynamically - unfortunately it only allows single additions.
Also correct me if I’m wrong, you can’t pass in a list/array of files into that field right?
Was introduced later from the UiPath.System.Activities package (try Version level 2024.10.X)
Qualified Access: UiPath.Platform.ResourceHandling.LocalResource.FromPath(...)
Hi @ashwin.ashok , if you want to compress more than 1 file, you could either add each file path manually, or, if you have multiple files you want to compress already located in a folder, you could specify the location of the folder instead of a file, and compress the folder with all files inside by toggling the “Folder” button on the activity.
You could move all the files you want to zip into a folder, then zip the folder.