I have 120 rasters( jpg format ) and i want to convert them to tiff format to folder called "OtherFormat" in env.workspace with arcpy. In my code i try to convert all jpg file I read http://resources.arcgis.com/en/help/main/10.2/index.html#//001200000032000000 and understand that i can do it if i will write the exact name of the raster. But i have 120 rasters so i tried to use asterisk:
import arcpy,os,sys,string import arcpy.mapping from arcpy import env env.workspace = r"C:\Project\out" arcpy.RasterToOtherFormat_conversion("*.jpg","OtherFormat","TIFF") print 'converted'
but get en error:
ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Rasters: Dataset *.jpg does not exist or is not supported Failed to execute (RasterToOtherFormat).