Skip to main content
Question

ZipExtractor settings

  • February 14, 2025
  • 1 reply
  • 43 views

fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Hey. Does anybody know how to solve the situation where I need zipextractor to not preserve the tree structure of the archive ( if it contains subfolders ) and save the file itself?

Thank you

1 reply

tb09114
Supporter
Forum|alt.badge.img+27
  • Supporter
  • February 17, 2025

How about using a PythonCaller and iterate over a listing of the archives content? The iteration can check if the path is pointing at a file or a directory and if it’s a file you can extract it to the location you want. 
 

I would wrap the whole thing in a custom transformer so you can specify the archive and the output directory.

This way you could even filter for specific file formats and control those with a dedicated user parameter of the custom transformer.