1

I have deleted a few ArcGIS Projects, created using ArcGIS Pro, by using Windows Explorer to delete the folder that contains them.

However, I thought that, as long as the project (not the current project) was not already open somewhere else, then it may have been possible to use the Project pane to delete it.

I added a folder connection in the Project pane to a folder above the project that I wanted to delete but when I right-clicked on the project there is no Delete option offered (and hitting the Delete key while it is highlighted does nothing either).

Is the recommended way to delete an ArcGIS Project (created using ArcGIS Pro) simply to use Windows Explorer to delete its folder?

Some research and results subsequent to asking this question appears below.

When I tried to use the Delete tool from the Geoprocessing pane to delete a project (not the one open, nor one that had been used in the session, but one that could be easily deleted from Windows Explorer after closing ArcGIS Pro) it resulted in an error:

ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application. Failed to execute (Delete).

enter image description here

The other complication is that using Windows Explorer works fine for deleting a project for which a folder was created but, when that checkbox is not chosen at the time of project creation, the project parts can be placed in an existing folder amongst many other files and subfolders. I thought there might be something that would use the *.aprx to identify and delete its project parts.

I don't yet understand the use case for when you would want to leave that checkbox unticked and potentially have multiple projects "free-floating" in a single folder. Until/unless I do, I'll be recommending to always leave the checkbox ticked and to delete project folders using Windows Explorer.

5
  • Do you want a more complicated response than "yes?" Isn't just deleting the folder in explorer a desirable thing? Commented May 15, 2015 at 0:50
  • I think the whole point of creating a folder is to create a singular place for project data; a tool that would delete any linked data could end in disaster, especially if it's shared across projects Commented May 15, 2015 at 1:17
  • I agree, and I don't yet understand the use case for when you would want to leave that checkbox unticked and potentially have multiple projects "free-floating" in a single folder. Until/unless I do, I'll be recommending to always leave the checkbox ticked and to delete project folders using Windows Explorer.
    – PolyGeo
    Commented May 15, 2015 at 1:22
  • I'm guessing it's a dumb compromise so that APRX files act more like MXD files Commented May 15, 2015 at 1:26
  • I don't know the design decision on the checkbox, but I've used it checked and unchecked: when I want to put my project in an existing folder, or make it. Both are valid workflows depending how you personally approach content management
    – KHibma
    Commented May 28, 2015 at 2:20

1 Answer 1

1

If you need to do this in code, use shutil.rmtree. File management is the file manager/standard library's job.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.