<?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: Loop through folder of JPGS and copy their names to a geodatabase table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131072#M10178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick.&amp;nbsp; Thanks Joe!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2020 16:18:36 GMT</pubDate>
    <dc:creator>CarverCounty</dc:creator>
    <dc:date>2020-05-06T16:18:36Z</dc:date>
    <item>
      <title>Loop through folder of JPGS and copy their names to a geodatabase table</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131070#M10176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

table &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'the location to the geodatabase table I wish to populate'&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'the folder path to my jpgs'&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; jpeg &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFiles&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*.jpg"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
   output &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;splitext&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;jpeg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; ouput
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyRows_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;output&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; table&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to loop through a folder that contains 500+ JPGs and copy their names to a geodatabase table.&amp;nbsp; I am able to successfully get to line 9 in my example code above and print all of my JPG names. However, when I get to line 10, I am unable to successfully copy these names to a new geodatabase table.&amp;nbsp; Would anyone have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Craig&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131070#M10176</guid>
      <dc:creator>CarverCounty</dc:creator>
      <dc:date>2021-12-11T07:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through folder of JPGS and copy their names to a geodatabase table</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131071#M10177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at&amp;nbsp; &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/data-access/insertcursor-class.htm"&gt;insert cursor&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 20:45:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131071#M10177</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-04T20:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through folder of JPGS and copy their names to a geodatabase table</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131072#M10178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick.&amp;nbsp; Thanks Joe!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2020 16:18:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-folder-of-jpgs-and-copy-their-names/m-p/131072#M10178</guid>
      <dc:creator>CarverCounty</dc:creator>
      <dc:date>2020-05-06T16:18:36Z</dc:date>
    </item>
  </channel>
</rss>

