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?
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.
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.