0

I am using ArcGIS ModelBuilder.

I want to use Field Calculator to put the file name into a field. I created a field using add field. But I don't know the function to call the file name. What I've tried is "!name!", "!file.name!".

2
  • Are you using the ModelBuilder of ArcGIS Pro or the one from ArcMap?
    – PolyGeo
    May 17 at 10:55
  • There is no means within a Cursor object or Field Calculator tool to determine the data set/source name that is being processed, that information needs to be determined outside a Cursor object or Field Calculator and passed to it.
    – bixb0012
    May 17 at 18:20

1 Answer 1

1

Try the Parse Path model builder tool.

You can also use arcpy.describe. The Describe Object Properties returns the path which you can field calculate into your attribute table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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