For ordinary shapefiles located on a disk, I know I can check the date modified using os.stat (see Creating table containing all filenames (and possibly metadata) in File Geodatabase?), but how would I do so if I want to know the date modified for a feature class WITHIN a file geodatabase?
Specifically via ArcPy in ArcGIS Desktop 10.2.
There are some XML based methods (Determining date or time Feature Class was created in File Geodatabase? and How do I find out when a shapefile was created?) but they seem a bit overkill just to get some basic metadata out.
Basic code:
import arcpy
gdbDir=r"D:\path\to\Default.gdb"
arcpy.env.workspace = gdbDir
fcList = arcpy.ListFeatureClasses()
for fc in fclist:
pass
#code to extract feature class's date modified goes here
No comments:
Post a Comment