I’m using the Compress/Zip Files activity and understand that if I wish to zip multiple files I have to seperate each file full path by “|”. I’ve tested the activity but the zip always gets corrupted and return the following error.
Cannot extract data from archive “C:\RPA\Billing\Downloaded\SR-230816-0002.zip”.
The zip file does get created successfully but just couldn’t be opened. The variable holding the file name returns the following.
Use an array or list: Instead of concatenating file paths with “|”, consider using an array or a list to hold the file paths. This can help you avoid any issues related to formatting or special characters.
Use a assign activity like this to get the array of filepaths like this
arr_filepaths = Split(yourvariable, “|”)
where arr_filepaths is a variable of type array of string
Now use a FOR EACH activity and pass the above array variable as input and change the type argument as string
Inside the loop use a COMPRESS TO ZIP activity and pass the filepath to be compressed as item.ToString and mention the zip folder path where u want to keep it compressed with its name