I have a series of files named as 'rawfile200101', 'rawfiles200102',...,'rawfile201104'. I want to do ZonalStatisticsAsTable for each of them with names corresponding to the time of the raw files, such as 'newfile200101', 'newfiles200102',...,'newfile201104'. I know how to script it for individal file, but I am trying to do it in batch. I wrote the following codes for four files, it is always shown error that "I:/rawfile%list%.tif" does not exist.
import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") yrmn = ['200101', '200102', '200103', '200104'] for list in yrmn: outZSaT = ZonalStatisticsAsTable("I:/boundaries", "ID", "I:/rawfile%list%.tif", "I:/newfile%list%.dbf", "DATA", "SUM")