AnsweredAssumed Answered

arcpy.CalculateField_Management syntax

Question asked by ldcarto on Jan 10, 2020
Latest reply on Jan 10, 2020 by ldcarto

I have been struggling with a python script for several days and I am hoping someone can provide me some guidance.

I need to be able to enter the filename from a txt file (original data) into the mdb table that was created from the txt file into a field named work_order.

I am using Windows 10, ArcGIS 10.7.1, python 2.7.16

 

The script is below.  It works correctly all the way until the final arcpy.CalculateField_management expression and I get an error that dir2 is not defined.  I have tried specifying the dir2 using single quotes, double quotes, and no quotes, and it won't work with any of those options.

If anyone can assist, I would greatly appreciate it.

 

Lisa

Attachments

Outcomes