Skip to main content
Solved

Zip a File GDB but exclude a named Feature Class


vxn43
Supporter
Forum|alt.badge.img+18

I am using FME Form 2021. 

I have completely re-written this post. What is the best approach to zip all Feature Classes in a File GDB without having each Feature Class show up individually in the workspace? I have 25+ Feature Classes and do not want them all to show up separately. Just want to zip up my File GDB. 

 

Sorry about the incorrect subject header. 

Best answer by takashi

Hi ​@vxn43 ,

I think File Copy writer can be used to create a zip archive containing File Geodatabase dataset (*.gdb).

  1. Create a feature which has an attribute named "filecopy_source_dataset" storing the target File Geodatabae dataset (*.gdb) path.
  2. Connect the feature to a File Copy writer, and set the writer parameters as in:
    • Dataset : Add suffix ".zip" to the destination folder path.
    • Surfolder Name : A preferable subfolder name. You can set "." if you don't need to use subfolder.
    • Copy Source Folder : Set "Yes".

Instead of regular writer, FeatureWriter (Format: File Copy) can also be used, as shown below.

 

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

2 replies

vxn43
Supporter
Forum|alt.badge.img+18
  • Author
  • Supporter
  • April 19, 2025

I found the answer. Seeing is believing. It works!

 

This workspace grabs a File GDB and zips it up to folder of my choice.

This method works best for zipping entire File GDBs with many Feature Classes; in my case, I have 22 Feature Classes. If you have only a couple of Feature Classes, you could zip the File GDB using a File GDB Reader, which will bring in each Feature Class as a separate Reader into your workspace. You then add separate File GDB Writers for each and choose the Zip option in the Writer. 

 

Does anyone have a different way to do this? Curious to know. 

 

 

Feature Writer Parameters from above screen capture:

 


takashi
Influencer
  • Best Answer
  • April 19, 2025

Hi ​@vxn43 ,

I think File Copy writer can be used to create a zip archive containing File Geodatabase dataset (*.gdb).

  1. Create a feature which has an attribute named "filecopy_source_dataset" storing the target File Geodatabae dataset (*.gdb) path.
  2. Connect the feature to a File Copy writer, and set the writer parameters as in:
    • Dataset : Add suffix ".zip" to the destination folder path.
    • Surfolder Name : A preferable subfolder name. You can set "." if you don't need to use subfolder.
    • Copy Source Folder : Set "Yes".

Instead of regular writer, FeatureWriter (Format: File Copy) can also be used, as shown below.

 


Reply


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