Now I am going through the process and trying to email the .pdf file I received by zipping it into a .zip file.
However, even if I try what the community has searched for, the compression doesn’t work and the loop ends. (There are no other errors.) How do I do this?
Hi @Bobae_Lee
Please refer this post for zipping single or multiple files,
Create a temporary folder(say TempFolder) to save your pdf files. Inside your for loop, use either move file or copy file activity to move your pdf files to the new location TempFolder. Now use invoke code activity and write the code “System.IO.Compression.ZipFile.CreateFromDirectory(TempFolder,ZipFilePath)”. Note that ZipFilePath and TempFolder should be “In” arguments for your invoke code activity.
This should solve your problem.
sorry. I don’t understand because I’m still learning.
Could you show me a sample?
@Bobae_Lee - Have you tried this activity? where you can simply point the as many folder(s) you want…
In the above example, i am zipping all the files in the folder called “Files” and zip file name is “PDFFiles”. Here is my output(since I just gave the zip name without any folder path, it got created under the project folder)