Skip to main content
Solved

How to collect all files in a folder into one ZIP-file

  • June 22, 2023
  • 4 replies
  • 262 views

Hi,

Does someone have a workspace example how to collect all files in a folder for creating a ZIP-file to send to the Mailer-transformer?

I am using FME Desktop 2022

Best answer by nielsgerrits

FeatureWriters to write the result to a folder. Sampler to collect the summary features from the FeatureWriters and let the last one pass to initiate the ZipArchiver from the hub to create a zip from the folder.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • June 22, 2023

Hello @arlvanbijleveld​ 

 

What kind of files do you want to extract?


nielsgerrits
VIP
Forum|alt.badge.img+61
  • Best Answer
  • June 22, 2023

FeatureWriters to write the result to a folder. Sampler to collect the summary features from the FeatureWriters and let the last one pass to initiate the ZipArchiver from the hub to create a zip from the folder.


FeatureWriters to write the result to a folder. Sampler to collect the summary features from the FeatureWriters and let the last one pass to initiate the ZipArchiver from the hub to create a zip from the folder.

This approach worked for me! I joined the Emailer to the Output-port of the ZipArchiver, as I discovered that the Logsuccess-port would send as many emails as the amount of files in the folder.

 

Thanks @nielsgerrits​ for your help!


nielsgerrits
VIP
Forum|alt.badge.img+61

This approach worked for me! I joined the Emailer to the Output-port of the ZipArchiver, as I discovered that the Logsuccess-port would send as many emails as the amount of files in the folder.

 

Thanks @nielsgerrits​ for your help!

Lol I think everyone using the Emailer has had the mailbomb experience. If it was bad enough, you will not make this mistake again.