In the below script the processed file will be added to the table of content in ArcGIS, since my data is too long it cause the program to be closed due to opening too many files, how I can run the script without opening the processed file in ArcGIS.
import arcpy
ws = arcpy.env.workspace = r'D:\BRB Snow Cover\Sample\Terra'
Terra_Rasters = arcpy.ListRasters("MOD*")
matches = 1
for item1 in Terra_Rasters:
for item2 in Terra_Rasters:
item1_num = int(item1[31:38])
item2_num = int(item2[31:38])
if (item2_num - 1) == item1_num:
print item1
print item2
print "Match"
output = "D:\\BRB Snow Cover\\Sample\\output1""\\" + str(item2) + '.tif'
arcpy.gp.Con_sa(item2, item1, output, item2, "\"Value\" =8")
else:
print "No"
matches = matches + 1