Does anyone have script out there to calculate the file path name with the field calculator....I am trying to add a field with the file path name so I can keep track of the original source directory of .shp's.

  • What software are you using? Jan 11, 2013 at 18:02

2 Answers 2


Another option would be to use describe() from arcpy. One of the describe object's properties includes a path to whatever object you passed to it. So you could use a loop to iterate through all your shapefiles, then add a field, and set the value of the field to be equal to the path property.


Understandable need, but use standard metadata for your data not a field in the database. ArcGIS will track many events like geoprocessing run on the data automatically. Check it out in ArcCatalog and online help here http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_automatic_metadata_updates/003t0000000q000000/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.