The for loop does away with the need for the "Next()" statements. Also, arcpy if very case sensitive. In the code below notice that AddRow is replaced by addRow. Unfortunately, I don't have any 4 band imagery to test my script.# Import system modules
import sys, string, os, arcpy
arcpy.env.workspace = "H:/"
tifList = arcpy.ListRasters("*.tif")
for inTIFF in tifList:
print inTIFF
outTIFF = "E:/Rasters/NAIP2009/" + inTIFF
# Create a value table to hold the multivalue parameters for the Union_analysis
vtab = arcpy.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)
arcpy.CompositeBands_management(vtab, outTIFF)