There doesn't appear to be a function in arcpy to return the file size of a feature class or it's date modified timestamp.
Anyone have any idea how to do this? I know there is a property somewhere because you can setup ArcCatalog to display the information. However, I want to see it returned in a Python Script so that I can write a two-way synchronization function.
import glob def compactAndReportFGDB(fgdbPath): oldFgdbSize = 0 for file in glob.glob(fgdbPath + "\\*"): oldFgdbSize = oldFgdbSize + os.path.getsize(file) arcpy.Compact_management(fgdbPath) newFgdbSize = 0 for file in glob.glob(fgdbPath + "\\*"): newFgdbSize = newFgdbSize + os.path.getsize(file) compactPct = str(int((oldFgdbSize - newFgdbSize) / float(oldFgdbSize) * 100)) return compactPct
Unless its a shapefile, I don't believe there is currently a way to do this with arcpy in v10.1.
By the looks of this http://gis.stackexchange.com/questions/23914/how-to-get-the-size-of-a-file-geodatabase-feature-class... you could probably get at this info with ArcObects someway.
edit: yup.. http://gis.stackexchange.com/questions/24242/how-to-programmatically-determine-the-size-of-a-feature... ArcObjects will get it done.