Skip to main content
Question

Read a shape file from a subfolder in a .zip file

  • March 4, 2020
  • 1 reply
  • 144 views

Forum|alt.badge.img
  • 12 replies

Can anyone advise how I can read a .shp file two sub-folders down from a zipped file? I've looked at previous posts on this group and they have suggested using wildcards to navigate the sub-folders (e.g. .zip/**/**/*.shp) but this hasn't worked for me.

The .zip file is found here and the pathway to the shape file I want is below, you can see that it is two subfolders down from the parent directory:

...\\HS2_Phase_2a_Additional_Provision_2_and_Supplementary_Environmental_Statement_2_February_2019.zip\\Shapefiles\\Construction_Proposed_Scheme\\CON_CN_ConsolidatedConstructionBoundary_Ply_CT05_AP02.shp

The shape file reader works fine when the folders are unzipped but won't work otherwise. I've also had no luck using a FeatureReader or when the .zip file is stored locally. I'm using FME Workbench 2019.2.

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.

1 reply

takashi
Celebrity
  • 7843 replies
  • March 4, 2020

A possible way is:

in the Add Reader dialog, select the format and then check the menu button > Select Multiple Folders/Files to open the Select File dialog,

 

in the Select File dialog, click the Add Files button, select the zip file, and check the Subfolders checkbox,

 

close it with OK button to complete the Dataset setting.