Tipically, ESRI GRIDS are not defined by a file extension like for the .tif files, but they are stored in a info folder plus an extra folder corresponding to the name of the raster. Arcpy allows to return a list with the ListRasters function. What is the best way to do it in a python script?
If you work with ArcGIS 10.1 SP1 or above, you can use the arcpy.da.Walk() function to list Esri or other GIS data formats recursively. Use the
type parameter to restrict the search to Esri GRID files:
import arcpy, os workspace = r"C:\directory" output_folder = r"C:\other_directory" walk = arcpy.da.Walk(workspace, type="GRID") for dirpath, dirnames, filenames in walk: for filename in filenames: print filename arcpy.RasterToOtherFormat_conversion(os.path.join(dirpath, filename), output_folder, "TIFF")