I am running my script from ArcMap and I have the Catalog window open on the side. I delete some extra files in the end of my script but I have to refresh the Catalog window to see them go. So I decided to use the following code to refresh it automatically:
import arcpy from arcpy import env import os.path # Parameters XS = arcpy.GetParameterAsText(0) # Environment Definition desc = arcpy.Describe(XS) path = desc.path env.workspace = path #Everything is saved at *path* arcpy.RefreshCatalog(path)
But it doesn't work either. Any idea what is missing here?
I am running my script though a toolbox. And my files are located at path.