I have been trying to get the raster iterator to work but i cannot get it to maintain the original file name. Script or model, either way it works, will work for me.
I wrote the following 2 and a half years ago so you'll want to it to arcpy. It retains the name of the original TIF but saves it to a different folder.
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Load required toolboxes...
gp.AddToolbox("C:/\Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
gp.workspace = "E:/Temp/FourBandNAIP"
tifList = gp.ListRasters("*")
inTIFF = tifList.Next()
while inTIFF:
outTIFF = "E:/Rasters/NAIP2009/" + inTIFF
if gp.exists(outTIFF):
print "Skipping " + str(inTIFF)
else:
# Create a value table to hold the multivalue parameters for the Union_analysis
vtab = gp.CreateObject("ValueTable")
vtab.AddRow(inTIFF + "\\Band_1")
vtab.AddRow(inTIFF + "\\Band_2")
vtab.AddRow(inTIFF + "\\Band_3")
# Process: Composite Bands...
print "Composite Bands 1 2 3 " + str(inTIFF)
gp.CompositeBands_management(vtab, outTIFF)
inTIFF = tifList.Next()
del gp