I have used concatenate function in excel to prepare the list of the calculator expressions [not sure if it is in the true format] and their output directories and file names as below.
"J:\sp1\sp1_Thresholded_0_3.img" + "J:\sp1\sp1_A2a_2020_Thresholded.img" ==> "J:\sp1\sp1_CCCMA_A2a_2020_GainLoss.img"
As described in the help for the Raster Calculator tool, these are python expressions, so you need to be careful to escape your strings. The correct format for your expression in the Python window would be:from arcpy.sa import *
rst = r"J:\sp1\sp1_Thresholded_0_3.img" + r"J:\sp1\sp1_A2a_2020_Thresholded.img";rst.save(r"J:\sp1\sp1_CCCMA_A2a_2020_GainLoss.img")
(Using the ";" to join multiple lines in python is generally frowned upon [it kind of takes away Python's elegance can introduce bugs] but in your case of creating command lines to paste in the python window it is a workable trick.)Note the use of "r" for raw strings. This prevents recognized escape expressions from being used, for example, "\t" is recognized by Python as a tab character (without the prefix "r").I still think [post=191665]using the ModelBuilder Iterate Rasters,[/post] with the Calculate Value tool used to set up your pathnames, is far preferable to generating arcpy code in Excel.