m.cain

Writing over interim features

Discussion created by m.cain on Mar 22, 2012
Hello,

I am trying to run a python script from a Command Prompt window. I believe it is failing because it is having difficulty overwriting previous files (particularly the intermediate ones).

I created a model in ModelBuilder, set the Environment Scratch workspace and set all intermediate outputs to output to something like %scratchworkspace%/InterimFeatures.gdb/InterimFile (or %scratchworkspace%/InterimFeatures.mdb/InterimFile) within ModelBuilder before exporting to a Python script (see: http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?topicname=Managing_intermediate_data).

The article above has a section on "Scratch data in scripting" but I am not sure what portion if any I need to modify if/when copy and pasting it into the beginning of the created script. Your advice would be appreciated.

--
I should also note that I have also made sure that the final output shapefile is deleted before being regenerated.

Outcomes