Skip to main content
Solved

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


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.

View original
Did this help you find an answer to your question?

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • June 22, 2023

Hello @arlvanbijleveld​ 

 

What kind of files do you want to extract?


nielsgerrits
VIP
Forum|alt.badge.img+54
  • 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.


nielsgerrits wrote:

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+54
arlvanbijleveld wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings