AnsweredAssumed Answered

Loop through folder of JPGS and copy their names to a geodatabase table

Question asked by CarverGIS on May 4, 2020
Latest reply on May 6, 2020 by CarverGIS
import arcpy
import os

table = r'the location to the geodatabase table I wish to populate'

arcpy.env.workspace = r'the folder path to my jpgs'
for jpeg in arcpy.ListFiles("*.jpg"):
   output = os.path.splitext(jpeg)[0]
   print ouput
arcpy.CopyRows_management(output, table)


I am trying to loop through a folder that contains 500+ JPGs and copy their names to a geodatabase table.  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.  Would anyone have any suggestions?


Thanks in advance,