The article you are trying to access is permanently deleted.
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # convert_dat2tif.py # Created on: 2013-11-11 14:07:05.00000 # (generated by ArcGIS/ModelBuilder) # Description: # --------------------------------------------------------------------------- # Import arcpy module import arcpy import glob import os path = 'D:\\MaggieData\\TE_Data\\Graphics\\' datpath = path + 'Dats\\' tifpath = path + 'Tifs\\' for folder in glob.iglob(datpath + '*'): # dat folder contains folders classified data, extracted, etc. type_ = os.path.basename(folder) # type_refers to classified data, extracted, stack, total, or percent for indat in glob.iglob(folder + '\\*.dat'): # go through all dat files in type_ folders, set them equal to paths or indat files that need to be converted to tif outtif = tifpath + type_ + '\\' + os.path.basename(indat)[:-3] + 'tif' # output is tiffs folder // type_ name // + suffix of indat file (minus the dat extension) plus a .tif extension print 'Processing %s ' %(indat) # Process: Copy Raster-- does nothing but convert to tiff arcpy.CopyRaster_management(indat, outtif, "", "", "256", "NONE", "NONE", "", "NONE", "NONE")
# Process: Copy Raster-- does nothing but convert to tiff arcpy.CopyRaster_management(indat, outtif, "", "", "256", "NONE", "NONE", "", "NONE", "NONE")