Problem - LOCK Files - Scripting

Discussion created by keags1 on Jul 5, 2011
Latest reply on Aug 5, 2011 by keags1
Hi all,

I was looking for a work-around for a problem I am having with regards to a script I am developing.
At the moment, I create a temp file, from which I perform the various geoprocessing tasks. This works out fine, until I have to restart the process.

This temp file needs to be deleted, so that if a user wishes to run the script at a new location they can. In ArcMap 9.3 and VBA I was able to use the "Kill("C:\test.*")" which would then delete all trace of that file so that everything could run again, without the fear of something being overwritten and causing an error.

In ArcMap 10 and in VB.Net, there is a LOCK file which prevents this shapefile from being deleted - even if it is removed from the active ArcMap session. Now I do not want to have to shut down and restart ArcMap for each iteration of this script. Is there a way to stop the LOCK file from being generated, or is there a way to release the file from the cache?

Thanks for your help!