Hi, I am still new in python. I would appreciate your guidance in looking at my script tool. I like to use your previous example to work on my tool. Can you help me?
#Composite Bands
#Usage: CompositeBand_management in_rasters;in_rasters...out_raster
import arcpy,sys,os
from arcpy import env
arcpy.env.overwriteOutput = True
env.workspace = r"F:\Programming Final\Input"
rasterList = [ ]
x = 1
for root, dirs, files in os.walk(path_images):
for name in files:
bands = os.path.join(root,name)
if WV2.endswith(('.tif')):
rasterList.append(bands)
if len(rasterList) > 0:
out_raster = path_images + "\\"+"Raster.tif"
arcpy.CompositeBands_management("rasterList, out_raster")
x += 1
Please see Dan Patterson 's guide to code formatting when posting, this block of code will put people off who would otherwise help you.