<?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: convert shapefile in nested folders to mdb in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473234#M36967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2015 19:19:08 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2015-07-29T19:19:08Z</dc:date>
    <item>
      <title>convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473226#M36959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a folder that has line 700 sub folders. each one has at least one shape file in it. i would like to take all 700+ and put them in a geodatabase and then start going thru them. how do i do this. python or model builder is ok &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 21:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473226#M36959</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-07-27T21:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473227#M36960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.) Walk through your nested folders: either &lt;A href="https://docs.python.org/2/library/os.html#os.walk"&gt;os.walk()&lt;/A&gt; or &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-data-access/walk.htm"&gt;arcpy.da.Walk()&lt;/A&gt;​ would work&lt;/P&gt;&lt;P&gt;2.) Import, one by one, into your mdb (many possible tools. Perhaps, &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/copy-features.htm"&gt;Copy Features&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 21:30:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473227#M36960</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-27T21:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473228#M36961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya but how do you put that together. &lt;/P&gt;&lt;P&gt;walk thru this folder and when you get .shp move it to mdb.? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 21:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473228#M36961</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-07-27T21:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473229#M36962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried anything yet?&lt;/P&gt;&lt;P&gt;Can't find any pre-made solution?&lt;/P&gt;&lt;P&gt;How familiar you with modelbuilder or python? Do you have a sample you are having problems with?&lt;/P&gt;&lt;P&gt;What do you intend to do with them when you get them there?&amp;nbsp; Just look at them?&amp;nbsp; Why no just use arccatalog to preview them if that is all you need.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 21:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473229#M36962</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-07-27T21:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473230#M36963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;I reworked a bit of an old script I had, but this should be close to what you need (Untested).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;The original post that is based off of is here if you need more refernece.&amp;nbsp; &lt;SPAN style="font-family: Consolas;"&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/107816" target="_blank"&gt;https://community.esri.com/thread/107816&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="keyword"&gt;import arcpy&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;import os&amp;nbsp; &lt;/SPAN&gt;
workspace = r&lt;SPAN class="string"&gt;"workspacepath"&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="string"&gt;out_mdb = r"filepathtomdbhere"&lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;for dirpath, dirnames, filenames &lt;SPAN class="keyword"&gt;in&lt;/SPAN&gt; arcpy.da.Walk(workspace,datatype=&lt;SPAN class="string"&gt;"FeatureClass"&lt;/SPAN&gt;):&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename &lt;SPAN class="keyword"&gt;in&lt;/SPAN&gt; filenames:&amp;nbsp; &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(os.path.join(dirpath , filename) , os.path.join(out_mdb , filename.strip(".shp")))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:55:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473230#M36963</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2021-12-11T20:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473231#M36964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The examples in the help show the basic pattern: use walk() to populate a list of files, for each file (possibly meeting a criteria, like being a shapefile) do &lt;EM&gt;something&lt;/EM&gt;. Your &lt;EM&gt;something&lt;/EM&gt; is to copy into a mdb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 21:54:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473231#M36964</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-27T21:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473232#M36965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi lela,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use &lt;STRONG&gt;Feature class iterator&lt;/STRONG&gt; and &lt;STRONG&gt;Feature class to feature class&lt;/STRONG&gt; (Conversion tool) in a model builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/119450_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/119448_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Remember to check &lt;STRONG&gt;Recursive&lt;/STRONG&gt; (optional).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 07:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473232#M36965</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-07-28T07:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473233#M36966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so is the test data the folder with the sub folders in it? and then it pulls the feature class name and then converts it to the gdb? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 14:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473233#M36966</guid>
      <dc:creator>lelaharrington</dc:creator>
      <dc:date>2015-07-29T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: convert shapefile in nested folders to mdb</title>
      <link>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473234#M36967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 19:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-shapefile-in-nested-folders-to-mdb/m-p/473234#M36967</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-07-29T19:19:08Z</dc:date>
    </item>
  </channel>
</rss>

