I am working in a corporation that publishes maps with ArcGIS but I use QGIS for working with data. I need to find the data files that show the information I want to publish and quickly send them via email to the office that has the ArcGIS facility. Using the layer properties, I can see where the data is located, but there is no open folder button, which is what I am looking for. I use Win 10, so Explorer will not open the path that I cut and paste from QGIS unless I replace the back slashes with forward slashes.

Is there an easy way to open the source folder from within QGIS 2.18.2?

  • Is this a feature that would be handy to have as core?
    – Nathan W
    Jan 4, 2017 at 4:38
  • @NathanW I think that would be a nice feature
    – underdark
    Jan 4, 2017 at 18:36

1 Answer 1

  1. Highlight the layer you want to navigate to.

  2. Open up the Python Console under the Plugins dropdown.

  3. Execute the following code line by line. The second line you can run again and again on different layer selections.

    import subprocess
    subprocess.call("explorer {0}".format("\\".join(qgis.utils.iface.activeLayer().source().split('/')[:-1])))

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.