Update metadata fields with Python.

5665
2
07-21-2015 05:09 PM
PaulHuffman
Occasional Contributor III

It was back in 2006 that I took a Virtual Campus course "Creating and Maintaining Metadata Using ArcGIS Desktop" and I think in that course I learned a trick to use python to update the contact info in metadata files. I think the course gave a list of variables that you could access with this trick. I think I extended that to access a couple other variables in the metadata files and loop through folders.  But I can't get a reminder looking back at the course because it's been retired. 

Is this still possible in ArcDesktop 10.2 and this new Item Description standard?

Tags (2)
0 Kudos
2 Replies
XanderBakker
Esri Esteemed Contributor

There are a number of threads on this topic:

Access metadata elements from within arcpy / python

One way to update metadata using Python

Re: List metadata with Python

Updating Custom Metadata Elements using Python automation. Export & Import Metadata

... and page 54 of this presentation: Mind Your Metadata

Maybe it is the simple export metadata, change the XML with python and import the XML again that you are looking for.

PaulHuffman
Occasional Contributor III

Thanks for the links, X.  

It looks like the way to do it now is export metadata to XML, string replace in XML, import XML to metadata.

I hoped I could be reminded about how I once did this.  Since I took the VC course in 2006, would that have been 9.3.1?  I thought I used a script that I adapted from this course quite a few times to update the contact info in my metadata.  I search the c:\student folder on my old machine but didn't find it.  I suppose there's no way to peak at a VC course that has been retired.

I should search my old server for this script.

0 Kudos