Skip to main content
Question

delete a shape file after publishing it to a feature service on ArcGIS portal?

  • April 19, 2018
  • 5 replies
  • 34 views

Hi, i want to delete a shape file after publishing it to a feature service on ArcGIS portal? would appreciate if anyone could help.

So before that i have converted an excel to a shape, then a shape to a feature service but i want to delete that shape after

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.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • April 19, 2018

You can use the SystemCaller transformer to execute the DOS Delete statement for removing the file.


david_r
Celebrity
  • April 20, 2018

My first choice would be to use a FeatureWriter (rather than a regular writer) to publish to ArcGIS Portal. Then connect a SystemCaller (as suggested by @erik_jan) to the Summary port to delete the shape file.

My second choice, if you prefer keeping the regular writer, would be to delete the file in the Python shutdown script.


  • Author
  • April 20, 2018

You can use the SystemCaller transformer to execute the DOS Delete statement for removing the file.

Hi @erik_jan thanks for your answer - do i need to create a new reader for the shape file i want to delete then connect the system caller? Also should the delete command in the system caller be something like this:

 

DELETE [D:]\\GIS\\common\\Test\\Test\\Test.gdb]DataTest_data

 

Sorry for all the questions I am new to fme so any help would be really appreciated.

 


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • April 20, 2018

You can use the SystemCaller transformer to execute the DOS Delete statement for removing the file.

I would use a FeatureWriter transformer to write the Shape file instead of an actual writer. That transformer has an output port (Summary) that contains an attribute with the Shape file name. (Also mentioned by @david_r)

 


takashi
Celebrity
  • April 20, 2018

Another way is, create a temporary directory with the TempPathnameCreator and write the Shapefile files there. The temporary directory created by the TempPathnameCreator and every file within it will be removed automatically by FME when the translation has completed.