# Name: ConsolidateResultEx1.py
# Description: Find all the Result files that reside in a specified folder and create a consolidated folder for each layer file.
# import system modules
import os
import arcpy
# Set environment settings
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/ResultFiles"
# Loop through the workspace, find all the result files (.rlt) and create a consolidated folder for each
# result file found using the same name as the original result file.
for rlt in arcpy.ListFiles("*.rlt"):
print("Consolidating " + rlt)
arcpy.ConsolidateResult_management(rlt, os.path.splitext(rlt)[0], "PRESERVE", "CONVERT_ARCSDE", "#", "ALL", "ALL")