I need help changing this code to do:
1) Within a specified directory, reproject all .tif and/or .shp files to: NAD_1983_UTM_Zone_16N without needing to input what the old projection is.
2) If already projected correctly, skip.
I attempted to search and manipulate existing code already out there, and found this: How do I use python to batch process the reprojection of a group of shapefiles?
import sys, arcpy, os mypath = r"C:\Users\Robby\Desktop\Test" shapefiles =  arcpy.env.workspace = mypath for ThisFile in os.listdir(mypath): thisName,thisExt = os.path.splitext(ThisFile) if thisExt.upper() == ".TIF": # or thisExt.upper() == ".SHP": # include your shape files as well shapefiles.append(ThisFile) out_workspace = r"C:\Users\Robby\Desktop\Test" out_cs = '' template = "C:\\" transformation = "NAD_1983_UTM_Zone_16N" # that's not a transform, but I'm not an expert on North American projections OutSR = arcpy.SpatialReference(26916) # http://spatialreference.org/ref/epsg/nad83-utm-zone-16n/, EPSG:26916 for ThisFile in shapefiles: desc = arcpy.Describe(ThisFile) SR = desc.spatialReference if SR.factoryCode != 26916: # http://spatialreference.org/ref/epsg/nad83-utm-zone-16n/, EPSG:26916 arcpy.Project_management(ThisFile,out_workspace + "\\" ThisFile,OutSR)