<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retrieving FULL file path in GDB - Describe() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/retrieving-full-file-path-in-gdb-describe/m-p/348181#M27312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't able to find a way to accomplish this just using the Describe function, but was able to get the full path by combining the Describe function with some OS functions and looping through each feature dataset.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;catalogPath = arcpy.Describe("Highway").catalogpath

for FD in arcpy.ListDatasets("*"):
&amp;nbsp;&amp;nbsp;&amp;nbsp; for FC in arcpy.ListFeatureClasses("*", "", FD):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.basename(catalogPath) in FC:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fullPath = os.path.dirname(catalogPath) + os.sep + FD + os.sep + FC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print fullPath&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:23:39 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-11T16:23:39Z</dc:date>
    <item>
      <title>Retrieving FULL file path in GDB - Describe()</title>
      <link>https://community.esri.com/t5/python-questions/retrieving-full-file-path-in-gdb-describe/m-p/348180#M27311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I have the FeatureClass 'Highway' located in "C:\Users\JohnCitizen\Documents\ArcGIS\Default.gdb\Roads\Highway" where Roads is a FeatureDataset, how do I retrieve "C:\Users\JohnCitizen\Documents\ArcGIS\Default.gdb\Roads" as the full file path?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the &lt;/SPAN&gt;&lt;STRONG&gt;Describe&lt;/STRONG&gt;&lt;SPAN&gt; Object properties (e.g. arcpy.Describe(Highway).path or arcpy.Describe(Highway).catalogPath) seem to return "C:\Users\JohnCitizen\Documents\ArcGIS\Default.gdb" or "C:\Users\JohnCitizen\Documents\ArcGIS\Default.gdb\Highway".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:59:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieving-full-file-path-in-gdb-describe/m-p/348180#M27311</guid>
      <dc:creator>JensTolsdorf</dc:creator>
      <dc:date>2011-10-04T22:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving FULL file path in GDB - Describe()</title>
      <link>https://community.esri.com/t5/python-questions/retrieving-full-file-path-in-gdb-describe/m-p/348181#M27312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wasn't able to find a way to accomplish this just using the Describe function, but was able to get the full path by combining the Describe function with some OS functions and looping through each feature dataset.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;catalogPath = arcpy.Describe("Highway").catalogpath

for FD in arcpy.ListDatasets("*"):
&amp;nbsp;&amp;nbsp;&amp;nbsp; for FC in arcpy.ListFeatureClasses("*", "", FD):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.basename(catalogPath) in FC:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fullPath = os.path.dirname(catalogPath) + os.sep + FD + os.sep + FC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print fullPath&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:23:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieving-full-file-path-in-gdb-describe/m-p/348181#M27312</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T16:23:39Z</dc:date>
    </item>
  </channel>
</rss>

