<?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: Export Geodatabase Contents to Text File? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438934#M25063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I am using v10.0 with SP4. Iwill try this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jun 2012 18:32:37 GMT</pubDate>
    <dc:creator>CharlesBanks1</dc:creator>
    <dc:date>2012-06-04T18:32:37Z</dc:date>
    <item>
      <title>Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438929#M25058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For organizational purposes I'm trying to organize feature class names in an Excel file.&amp;nbsp; Is there a way to export the feature class names/contents of a Geodatabase to a Text file?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so it will save a lot of time spent recreating the file names.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438929#M25058</guid>
      <dc:creator>JoshuaDamron</dc:creator>
      <dc:date>2012-05-25T14:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438930#M25059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Joshua,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Python will do this for you quite easily.&amp;nbsp; Try something like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

# create or open an existing text file
f = open("c:\\data\\fc_list.txt", "a")

# specify the geodatabase you want to retrieve feature classes from
gdb = "c:\\data\\MyGeodatabase.gdb"

# set your environment workspace
arcpy.env.workspace = gdb

#list all of the feature datasets within the geodatabase
datasetList = arcpy.ListDatasets("*")

# within each feature dataset, list the feature classes and write them to the text file
for dataset in datasetList:
 fcList1 = arcpy.ListFeatureClasses("*","",dataset)
 for fc in fcList1:
&amp;nbsp; f.write(fc + "\n")

# find all of the feature classes which do not reside within a feature dataset
fcList2 = arcpy.ListFeatureClasses("*")

# write the feature class names to the text file which don't reside in the feature dataset
for fc in fcList2:
 f.write(fc + "\n")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438930#M25059</guid>
      <dc:creator>TimHopper</dc:creator>
      <dc:date>2021-12-11T19:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438931#M25060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I modified the script a little bit and threw it in a toolbox as a script tool for you so you can see how it all gets put together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

outputDir = arcpy.GetParameterAsText(0)
outputName = arcpy.GetParameterAsText(1)
gdb = arcpy.GetParameterAsText(2)

textFile = (outputDir + os.sep + outputName + ".txt")

f = open(textFile, "a")

arcpy.env.workspace = gdb

datasetList = arcpy.ListDatasets("*")

for dataset in datasetList:
 fcList1 = arcpy.ListFeatureClasses("*","",dataset)
 for fc in fcList1:
&amp;nbsp; f.write(fc + "\n")

fcList2 = arcpy.ListFeatureClasses("*")

for fc in fcList2:
 f.write(fc + "\n")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:38:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438931#M25060</guid>
      <dc:creator>TimHopper</dc:creator>
      <dc:date>2021-12-11T19:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438932#M25061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried your Toolbox but there are no contents. Could you please elaborate on how to get it to work? What are the parameters, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438932#M25061</guid>
      <dc:creator>CharlesBanks1</dc:creator>
      <dc:date>2012-06-04T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438933#M25062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps I accidentally create the toolbox at v10.1?&amp;nbsp; I'm surprised nobody else commented.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I re-created the toolbox at v10.0, seems to work fine for me.&amp;nbsp; Hopefully it works for you as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are three parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Output folder (windows folder)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Output text file name (such as MyOutputFile)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Input geodatabase&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438933#M25062</guid>
      <dc:creator>TimHopper</dc:creator>
      <dc:date>2012-06-04T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438934#M25063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I am using v10.0 with SP4. Iwill try this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438934#M25063</guid>
      <dc:creator>CharlesBanks1</dc:creator>
      <dc:date>2012-06-04T18:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Export Geodatabase Contents to Text File?</title>
      <link>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438935#M25064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey, Tim, it worked!! It seems to work only for File GDB though. When I try to bring in a SDE GDB it seems not to be connecting to SDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/export-geodatabase-contents-to-text-file/m-p/438935#M25064</guid>
      <dc:creator>CharlesBanks1</dc:creator>
      <dc:date>2012-06-04T18:40:22Z</dc:date>
    </item>
  </channel>
</rss>

