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)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.