Skip to main content
Question

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


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

5 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • 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
erik_jan wrote:

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+17
  • Contributor
  • April 20, 2018
erik_jan wrote:

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
Influencer
  • 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.


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