AnsweredAssumed Answered

Adding All Raster Layer with the Same Name format in ArcMap

Question asked by sourav@iastate.edu_ISUGISF on Jun 6, 2018
Latest reply on Jun 6, 2018 by sourav@iastate.edu_ISUGISF

In a folder, I have 150+ raster files - some of them are pansharpened images, some are panchromatic images, and some are in other formats. Among them, 30+ pansharpened raster has the same naming format of date_ZoneName_pansharpened.tif  (e.g. 20180511_TX1_pansharpened.tif,  20180511_TX2_pansharpened.tif,  20180511_TX2_pansharpened.tif and etc.). Now, I am adding them to ArcMap one by one with “Add data” menu. It’s time-consuming and not efficient. Is there any way of running a python script that goes through the folder and looks for any files with “_pansharpened.tif” in its name and imports it automatically to ArcMap?