Reviewed this again today, and it appears you are also mixing hard-coded pathnames with pathname variables, so let the following code serve as an example, where the 'variable section' should be the only section you need to adjust (see the attached py as well):
# import the needed modules
import arcpy, os
arcpy.env.overwriteOutput = True
##########################################
## VARIABLE SECTION - MODIFY THIS SECTION ONLY
# here's where you need to define some variables
# The following variable is for setting the workspace to a directory of rasters:
arcpy.env.workspace = r'F:\12109\2011 aerials'
# ...variable for the polygon shapefile or feature class for the raster outline (grid) output pathname, for example:
GridName = r'C:\temp\test.shp'
# ...variable, a numeric value, specifying the text field length needed to hold the pathname...
# If it is a long pathname, then a longer field length will be required:
IMAGEfldLen = 200
## END VARIABLE SECTION - DO NOT MODIFY BELOW THIS LINE
#########################################
outPath, outName = GridName.rsplit(os.sep, 1)
arcpy.CreateFeatureclass_management(outPath, outName, 'POLYGON')
fields = ['IMAGE', 'XMIN', 'XMAX', 'YMIN', 'YMAX']
arcpy.AddField_management(GridName, fields[0], 'TEXT', '', '', IMAGEfldLen)
for i in range(1, 5):
arcpy.AddField_management(GridName, fields, 'DOUBLE', 18, 17)
rasters = arcpy.ListRasters()
arrayObj = arcpy.CreateObject('Array')
outRows = arcpy.InsertCursor(GridName)
for raster in rasters:
extent = arcpy.Describe(raster).extent
arrayObj.add(extent.lowerleft)
arrayObj.add(extent.lowerright)
arrayObj.add(extent.upperright)
arrayObj.add(extent.upperleft)
arrayObj.add(extent.lowerleft)
feat = outRows.newRow()
feat.Shape = arrayObj
image = os.path.join(arcpy.env.workspace, raster)
feat.setValue('IMAGE', image)
feat.setValue('XMIN', extent.xmin)
feat.setValue('YMIN', extent.ymin)
feat.setValue('XMAX', extent.xmax)
feat.setValue('YMAX', extent.ymax)
outRows.insertRow(feat)
arrayObj.removeAll()
del outRows
A note of interest here -- as an 'extra' attribute table feature, attributes are set up so that if using within ArcMap, you have the option of exporting the attribute table to a separate dbf or gdb table (save to a different name than the shapefile/fc) and when adding to ArcMap, it serves as a 'legacy' image catalog...you have to add it after completing the table export process, i.e., so that it's read as an 'image catalog', not just as a table. Images will be auto-loaded --- adjust display properties accordingly from the table properties window.