Sunday 16 June 2019

arcgis 10.2 - Getting date modified for feature class within file geodatabase via ArcPy?



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

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...