I often need the full path to various feature classes so that I may insert them into a Python script. I have been using ArcCatalog for this by copying the path in the Location bar for a given feature class and pasting this in my script. However, as I work mostly in ArcMap, I would rather have access to this path there. The General and Source tabs in a feature classes Properties window do not contain the full path in an SDE and the path is in two separate lines in a file gdb. How may I quickly find this path in ArcMap?

  • In what way are they not in the Source tab? A screenshot showing this may be useful to explain what you mean – Midavalo Mar 17 '17 at 20:01
  • Arcpy can pull a path from a layer/feature class if required – Midavalo Mar 17 '17 at 20:01
  • 1
    You know you can have catalog opened inside arcmap right? – BERA Mar 17 '17 at 20:55
  • Lol BERA is right the Location bar is also in the Catalog window in ArcMap – atxgis Mar 17 '17 at 21:07
  • I didn't know clicking in this window made full path appear. It initially only shows FC name. – reevesii Mar 17 '17 at 21:16

Not sure if this is as easy as you like, but you can use these three lines of code in the python window (drag or write feature class name for fc variable).

fc = (Drag feature class here from Table Of Contents)
fcpath = arcpy.Describe(fc)
print fcpath.path + "\\" + fc

This will return the path including the feature class name.

  • 1
    This will be quicker for me than having to resort to ArcCatalog. And I didn't know one could drag FCs into the Python window. Very cool. Thanks. – reevesii Mar 17 '17 at 20:25
  • Apparently stand alone tables cannot be dragged into Python window the same way. – reevesii Mar 17 '17 at 20:44
  • Ha, that's strange. Classic ESRI. As long as the table has been added to the table of contents you can write the name in for the fc variable, but then idk if its faster than copy and paste from the source tab. – atxgis Mar 17 '17 at 20:53

Apparently there is also a Location toolbar in the ArcMap Catalog window that works similar to that in ArcCatalog. I first clicked on the feature class I was interested in, (e.g., Feature_A_P shown below) then clicked within the Location toolbar window and the full path appeared. I am able to copy this and paste in script as needed.

I guess I never bothered to click within this window before.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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