AnsweredAssumed Answered

Metadata Importer Conversion with ArcPy

Question asked by knkeeley on Feb 20, 2018
Latest reply on Feb 21, 2018 by knkeeley

I want to apply the metadata of one feature class I created to 60 others in the same dataset within a geodatabase. When I use this code, ArcCatalog freezes for a while and then prints "TOTALLY DONE NOW". However, the feature classes in the dataset do not have any metadata added and it appears like nothing happened. What could be going wrong?

 

import arcpy

ds = arcpy.env.workspace = "M:\CPS\DO\GIS_TR\Floodplain.gdb\Sample"
targetMeta = "M:/CPF/DO/GIS_TR/Floodplain.gdb/Sample/Sample_S7DU05"

for fc in arcpy.ListFeatureClasses(ds):
  arcpy.MetadataImporter_conversion(targetMeta, fc)
  print "done with " + fc
print "TOTALLY DONE NOW"

Outcomes