In the code below, I'm not getting any errors, but nothing gets copied either. I added the print statements so that I could verify the values in lst_names do in fact have matches in all_names. Any idea why nothings getting copied? Thanks.
import arcpy topo_names = r"C:\Users\gkeith\Documents\Projects\GIS\Contours\Topo.gdb\Topo\TopoGrid" name_field = "PageName" from_folder = "F:/LiDAR2013/All Topos/Lidar2012.gdb/" to_folder = "C:/Users/gkeith/Documents/Projects/GIS/Contours/TempleTopo.gdb/TopoLines/" arcpy.env.workspace = "F:/LiDAR2013/All Topos/Lidar2012.gdb/" lst_names = arcpy.SearchCursor(topo_names, "", "", name_field, name_field) all_names = arcpy.ListFeatureClasses() i = 0 for name in all_names: print name print '________________________' for row in lst_names: print row.PageName for row in lst_names: if row.PageName in all_names: arcpy.Copy_management(from_folder, to_folder, "") print 'Done'