Hello everyone,
How can I delete an sde file located in my scratch space.
prefixOutputWorkspace = r"C:\scratch\....\ConnectionToSQL.sde"
if arcpy.Exists(prefixOutputWorkspace): delete this sde conection
Recreate sde connection
Thanks
Hi,
This is what I did:
if os.path.exists(sdeFile):
# removing the file using the os.remove() method
os.remove(sdeFile)
You can always use 15.1. os.remove() — Miscellaneous operating system interfaces — Python 2.7.17 documentation to remove files on the file system.
Or, if you want to stay within ArcPy modules: Delete—Data Management toolbox | Documentation
Deleting a database connection file does not delete the enterprise database. A database connection file is simply a shortcut to the database.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.