import arcpy,os from arcpy import env path = r'H:\Python\Python\xyz_pruebas' lstFiles = [] for root, dirs, files in os.walk(path): arcpy.env.workspace = root files = arcpy.ListRasters("*", "JPG") for fichero in files: (nombreFichero, extension) = os.path.splitext(fichero) if(extension == ".jpg"): lstFiles.append(os.path.join(root, fichero)) print (lstFiles)
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.