I've written a tool to create shapefiles using GDAL and am viewing the results in QGIS. Each time the tool runs, I want to create a new output directory*. I'm using QGIS 2.18.9 on Windows 10.
The problem is that, if I have viewed the previous result in QGIS, I cannot delete the output directory unless I close the whole application. Just removing the layer from the display isn't enough - there is still a lock on the directory. I don't want to close QGIS each time I run the tool. The browser panel doesn't seem to have a delete option, like ArcCatalog does, unless I'm missing something.
I have found that if I right click on the output directory and select Hide From Browser, I can run the tool again, but I don't know how to unhide it again. I have to click Add Layer and browse to the shapefile if I want to look at the output.
So the question is, how do I delete a folder, having viewed the contents in QGIS? I've used ArcGIS a lot, but I'm relatively new to QGIS. Is there a way to either delete the folder from within the browser or otherwise release it so I can delete it from elsewhere?
*This is by design - I want to put the onus on the user to make sure the output directory doesn't exist, rather than have the tool potentially delete existing data.