I have a zip file that has some shapefiles I need to load. Only problem is that the shapefiles are buried 3 folders deep. Any advice?
how to read zipped shapefiles that are 3 folders deep
- January 15, 2019
- 7 replies
- 139 views
- Enthusiast
- 87 replies
Best answer by hollyatsafe
Hi @tnarladni,
Please review the usage Notes here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/archive_files_reading.htm
If the files you wish to open are in a folder nested within a top-level folder, include \\**\\ to navigate to the next folder. For example, C:\\Zipster\\*.zip\\**\\*.shp
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.
7 replies
- 719 replies
- Best Answer
- January 16, 2019
Hi @tnarladni,
Please review the usage Notes here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/archive_files_reading.htm
If the files you wish to open are in a folder nested within a top-level folder, include \\**\\ to navigate to the next folder. For example, C:\\Zipster\\*.zip\\**\\*.shp
- Supporter
- 1442 replies
- January 16, 2019
Thanks to @takashi this issue was solved with python sometime ago:
https://knowledge.safe.com/questions/4864/triple-zipped-xml.html
You just need to add the authentication part to the python script.
- Contributor
- 11 replies
- March 19, 2019
Hi @tnarladni,
Please review the usage Notes here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/archive_files_reading.htm
If the files you wish to open are in a folder nested within a top-level folder, include \\**\\ to navigate to the next folder. For example, C:\\Zipster\\*.zip\\**\\*.shp
If I want to use a zipped shapefile in a specific subfolder, which is located in the internet, it doesn't work.
I tried it with fme 2018 with the following zipped shapefile:
I want to read the shapefile in the subfolder VGD-Steiermark/Steiermark_gstgenau/*.shp, but I didn't make it.
I tried a lot of variants, but each failed:
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/VGD-Steiermark/Steiermark_gstgenau/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\VGD-Steiermark\\Steiermark_gstgenau\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\**\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\*.shp
Can someone help me?
- 719 replies
- March 19, 2019
If I want to use a zipped shapefile in a specific subfolder, which is located in the internet, it doesn't work.
I tried it with fme 2018 with the following zipped shapefile:
I want to read the shapefile in the subfolder VGD-Steiermark/Steiermark_gstgenau/*.shp, but I didn't make it.
I tried a lot of variants, but each failed:
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/VGD-Steiermark/Steiermark_gstgenau/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\VGD-Steiermark\\Steiermark_gstgenau\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\**\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\*.shp
Can someone help me?
Hi @gtitz,
Are you attempting to access these shapefiles using the ESRI Shapefile Reader?
It seems I can't access the link you provided without a portal log in so this might be where the problem lies. Please could you try using a Creator >HTTP Caller>Feature Reader instead.
You will need to save the Response Body to a file in the HTTPCaller and have Create a file per feature=yes. This transformer also allows you to set the appropriate Authentication requirements.
Then in the Feature Reader you can set the dataset to read to the response_file_path attribute.
- Contributor
- 11 replies
- March 21, 2019
Hi @gtitz,
Are you attempting to access these shapefiles using the ESRI Shapefile Reader?
It seems I can't access the link you provided without a portal log in so this might be where the problem lies. Please could you try using a Creator >HTTP Caller>Feature Reader instead.
You will need to save the Response Body to a file in the HTTPCaller and have Create a file per feature=yes. This transformer also allows you to set the appropriate Authentication requirements.
Then in the Feature Reader you can set the dataset to read to the response_file_path attribute.
Hi @hollyatsafe,
yes, I read the zipped shapefile with the ESRI Shapefile Reader.
Did you try the first link? That should work. The other links are just shortened links, where I've cut away the first part for clarity.
You can also go to the following page and copy the URL of the highlighted link:
http://www.bev.gv.at/portal/page?_pageid=713,2601287&_dad=portal&_schema=PORTAL
I didn't try your workaround yet, because the zip file is accessible for everyone without login, so (as you said) it should work with the ESRI Shapefile Reader.
- 719 replies
- March 21, 2019
Hi @hollyatsafe,
yes, I read the zipped shapefile with the ESRI Shapefile Reader.
Did you try the first link? That should work. The other links are just shortened links, where I've cut away the first part for clarity.
You can also go to the following page and copy the URL of the highlighted link:
http://www.bev.gv.at/portal/page?_pageid=713,2601287&_dad=portal&_schema=PORTAL
I didn't try your workaround yet, because the zip file is accessible for everyone without login, so (as you said) it should work with the ESRI Shapefile Reader.
Hi @gtitz
My mistake - the first link you provided was taking me to Error:Document Not Found and when I tried to work back down the url I ended up at a portal log in page. Thanks for clearing that up for me.
Anyway I've done some further digging as I'm seeing the same problem and unfortunately it looks like specifying a subdirectory (/**) is not currently supported because the Reader cannot determine where the URL pattern for the dataset ends and the extension pattern starts.
Instead the workaround would be what I previously suggested using the HTTPCaller - you can then download the folder and in the Feature Reader you will be able to specify the subfolder/wildcard. I've attached a workspace using your url to demonstrate this.
https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" alt="https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmwhttps://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" target="_blank">URL_subdirectory_shp.fmw
- Contributor
- 11 replies
- March 22, 2019
Hi @gtitz
My mistake - the first link you provided was taking me to Error:Document Not Found and when I tried to work back down the url I ended up at a portal log in page. Thanks for clearing that up for me.
Anyway I've done some further digging as I'm seeing the same problem and unfortunately it looks like specifying a subdirectory (/**) is not currently supported because the Reader cannot determine where the URL pattern for the dataset ends and the extension pattern starts.
Instead the workaround would be what I previously suggested using the HTTPCaller - you can then download the folder and in the Feature Reader you will be able to specify the subfolder/wildcard. I've attached a workspace using your url to demonstrate this.
https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" alt="https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmwhttps://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" target="_blank">URL_subdirectory_shp.fmw
Maybe this can be fixed in a future version.
Thank you!! Your workaround works fine.
I have a zip file that has some shapefiles I need to load. Only problem is that the shapefiles are buried 3 folders deep. Any advice?
Hi @tnarladni,
Please review the usage Notes here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/archive_files_reading.htm
If the files you wish to open are in a folder nested within a top-level folder, include \\**\\ to navigate to the next folder. For example, C:\\Zipster\\*.zip\\**\\*.shp
Thanks to @takashi this issue was solved with python sometime ago:
https://knowledge.safe.com/questions/4864/triple-zipped-xml.html
You just need to add the authentication part to the python script.
Hi @tnarladni,
Please review the usage Notes here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Desktop/Workbench/archive_files_reading.htm
If the files you wish to open are in a folder nested within a top-level folder, include \\**\\ to navigate to the next folder. For example, C:\\Zipster\\*.zip\\**\\*.shp
If I want to use a zipped shapefile in a specific subfolder, which is located in the internet, it doesn't work.
I tried it with fme 2018 with the following zipped shapefile:
I want to read the shapefile in the subfolder VGD-Steiermark/Steiermark_gstgenau/*.shp, but I didn't make it.
I tried a lot of variants, but each failed:
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/VGD-Steiermark/Steiermark_gstgenau/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\VGD-Steiermark\\Steiermark_gstgenau\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\**\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\*.shp
Can someone help me?
If I want to use a zipped shapefile in a specific subfolder, which is located in the internet, it doesn't work.
I tried it with fme 2018 with the following zipped shapefile:
I want to read the shapefile in the subfolder VGD-Steiermark/Steiermark_gstgenau/*.shp, but I didn't make it.
I tried a lot of variants, but each failed:
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/VGD-Steiermark/Steiermark_gstgenau/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip/**/*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\VGD-Steiermark\\Steiermark_gstgenau\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\**\\*.shp
...UNENTGELTLICHE_PRODUKTE_DES_BEV/VGD-Steiermark.zip\\**\\*.shp
Can someone help me?
Hi @gtitz,
Are you attempting to access these shapefiles using the ESRI Shapefile Reader?
It seems I can't access the link you provided without a portal log in so this might be where the problem lies. Please could you try using a Creator >HTTP Caller>Feature Reader instead.
You will need to save the Response Body to a file in the HTTPCaller and have Create a file per feature=yes. This transformer also allows you to set the appropriate Authentication requirements.
Then in the Feature Reader you can set the dataset to read to the response_file_path attribute.
Hi @gtitz,
Are you attempting to access these shapefiles using the ESRI Shapefile Reader?
It seems I can't access the link you provided without a portal log in so this might be where the problem lies. Please could you try using a Creator >HTTP Caller>Feature Reader instead.
You will need to save the Response Body to a file in the HTTPCaller and have Create a file per feature=yes. This transformer also allows you to set the appropriate Authentication requirements.
Then in the Feature Reader you can set the dataset to read to the response_file_path attribute.
Hi @hollyatsafe,
yes, I read the zipped shapefile with the ESRI Shapefile Reader.
Did you try the first link? That should work. The other links are just shortened links, where I've cut away the first part for clarity.
You can also go to the following page and copy the URL of the highlighted link:
http://www.bev.gv.at/portal/page?_pageid=713,2601287&_dad=portal&_schema=PORTAL
I didn't try your workaround yet, because the zip file is accessible for everyone without login, so (as you said) it should work with the ESRI Shapefile Reader.
Hi @hollyatsafe,
yes, I read the zipped shapefile with the ESRI Shapefile Reader.
Did you try the first link? That should work. The other links are just shortened links, where I've cut away the first part for clarity.
You can also go to the following page and copy the URL of the highlighted link:
http://www.bev.gv.at/portal/page?_pageid=713,2601287&_dad=portal&_schema=PORTAL
I didn't try your workaround yet, because the zip file is accessible for everyone without login, so (as you said) it should work with the ESRI Shapefile Reader.
Hi @gtitz
My mistake - the first link you provided was taking me to Error:Document Not Found and when I tried to work back down the url I ended up at a portal log in page. Thanks for clearing that up for me.
Anyway I've done some further digging as I'm seeing the same problem and unfortunately it looks like specifying a subdirectory (/**) is not currently supported because the Reader cannot determine where the URL pattern for the dataset ends and the extension pattern starts.
Instead the workaround would be what I previously suggested using the HTTPCaller - you can then download the folder and in the Feature Reader you will be able to specify the subfolder/wildcard. I've attached a workspace using your url to demonstrate this.
https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" alt="https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmwhttps://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" target="_blank">URL_subdirectory_shp.fmw
Hi @gtitz
My mistake - the first link you provided was taking me to Error:Document Not Found and when I tried to work back down the url I ended up at a portal log in page. Thanks for clearing that up for me.
Anyway I've done some further digging as I'm seeing the same problem and unfortunately it looks like specifying a subdirectory (/**) is not currently supported because the Reader cannot determine where the URL pattern for the dataset ends and the extension pattern starts.
Instead the workaround would be what I previously suggested using the HTTPCaller - you can then download the folder and in the Feature Reader you will be able to specify the subfolder/wildcard. I've attached a workspace using your url to demonstrate this.
https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" alt="https://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmwhttps://s3.us-west-2.amazonaws.com/community-migration/QAComments/url-subdirectory-shp65939.fmw" target="_blank">URL_subdirectory_shp.fmw
Maybe this can be fixed in a future version.
Thank you!! Your workaround works fine.
Helpful Members This Week
- redgeographics
19 votes
- ebygomm
15 votes
- nielsgerrits
9 votes
- liamfez
9 votes
- david_r
9 votes
- geomancer
9 votes
- hkingsbury
9 votes
- philippeb
8 votes
- takashi
8 votes
- alexbiz
6 votes
Recently Solved Questions
Community Stats
- 31,940
- Posts
- 121,314
- Replies
- 39,557
- Members
Latest FME
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Scanning file for viruses.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
OKThis file cannot be downloaded
Sorry, our virus scanner detected that this file isn't safe to download.
OKCookie 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
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.